Results 1 to 6 of 6

Thread: .inventory gives NIL

  1. #1
    Senior Member Ancient Order's Avatar
    Join Date
    Aug 2015
    Location
    Paris, Fr.
    Posts
    256

    Default .inventory gives NIL

    hello! im trying to use the .inventory property just to see what's in it but can't seem to get anything but NIL

    Code:
    main:
    	
    	level waittill spawn
    	if (level.inventory) end
    	level.inventory = 1
    	println ("in inventory")
    	while(1){
    		if($player){
    			for (local.i = 1; local.i <= $player.size; local.i++) {
    				local.inventory = $player[local.i].inventory
    				println (local.inventory)
    			}
    		}
    		wait 10
    	}
    end

  2. #2

    Default

    Inventory is an array so just to be sure try printing its size, or just try printing the first item local.inventory[0]

  3. #3
    Senior Member Ancient Order's Avatar
    Join Date
    Aug 2015
    Location
    Paris, Fr.
    Posts
    256

    Default

    thanks Smithy, helas size is -1

  4. #4

    Default

    Silly question but are you definitely running Reborn?

  5. #5
    Senior Member Ancient Order's Avatar
    Join Date
    Aug 2015
    Location
    Paris, Fr.
    Posts
    256

    Default

    i think so, will check if i miss a file but netname is working. Im on a local server in countdown mode for now, will try with other contexts.

    ------------------ MoH:AA 1.12 Reborn Patch InitGame ------------------
    Initializing CVARS. Done!
    --> Next update check will be performed after 64963 hours (2706 day/s)!
    Could not open chatfilter.cfg
    Initializing Chat Filter. Done!
    Could not open namefilter.cfg
    Initializing Banned Names List. Done!
    Could not open ipfilter.cfg
    Initializing Banned IPs List. Done!
    Could not open allowedvotes.cfg
    Initializing Allowed Votes List. Done!
    Could not open allowedmaps.cfg
    Initializing Allowed Maps List. Done!
    Could not open admins.ini
    Initializing Admins List. Done!
    Could not open protectednamefilter.cfg
    Initializing Protected Names List. Done!
    Reborn.map mapped into address space. Shared settings initialized!
    LocalizationError fix Address: 0x0043bb24
    LocalizationError removal fix applied.
    G_BulletAttack Address: 0x31176e10
    G_BulletAttack: Hooked correctly.
    SV_AddEntitiesVisibleFromPoint Address: 0x434520
    Anti Wallhack/Visuals Protection applied
    Black Window Patch Address: 0x31177640
    Shoot through Black Window/Furniture/Light Bulbs Hack Protection applied
    RConFlood Patch Address: 0x432fc1
    RConFlood Crash Protection applied
    InfoBoom Patch Address: 0x421ba3 & 0x421b4e
    InfoBoom Patch Address: 0x421ba3
    InfoBoom Crash Protection applied
    MoH:AA BOF (Buffer Overflow) Address: 0x428fad
    MoH:AA BOF (Buffer Overflow) Crash Protection applied
    SV_UpdateUserinfo_f Address: 0x42f0f0
    UserInfo Buffer overflow protection applied (512 chars limit)
    ScriptedEvents System Initialized
    Kick/Ban Announcements Initialized
    Internal Packet Flood Protection Initialized
    Allowed remote tool IP: 127.0.0.1 (7f000001)
    ---------------- MoH:AA 1.12 Reborn Patch InitFinished ----------------

  6. #6

    Default

    If I remember correctly .inventory is broken on linux (it crashes the server) and it was never fixed

    If you are using windows it should work fine
    It will only return NIL if the player is in spectator mode

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •