Jump to content

Help with a sorting script


Recommended Posts

I'm trying to get a script to work that a friend gave me to sort ammo. I want my 5.56mm ammo to go into an ammo box that's ID name is houseammobox4. The geck gives me a warning saying its an invalid reference that only object references and reference variables are allowed in that context. Can anyone here help me out? I've set the ammo box to persistant but still no joy.

Short Playercount

Set PlayerCount to (Player.GetItemCount Ammo556mm)
Player.RemoveItem Ammo556mm PlayerCount 1
houseammobox4.AddItem Ammo556mm PlayerCount 1

Link to comment
Share on other sites

Pretty strange eh. Never had such a problem on my own.

If your reference ID of ammo box is houseammobox4, it mustn't be having any problems. Are you sure you gave your ammobox its own referenceID which equals to 'houseammobox4' or it is object name? It will work for reference only as GECK told you.

Edited by Maxandmov
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...