gunslinger6792 Posted May 27, 2014 Share Posted May 27, 2014 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 PlayercountSet PlayerCount to (Player.GetItemCount Ammo556mm)Player.RemoveItem Ammo556mm PlayerCount 1houseammobox4.AddItem Ammo556mm PlayerCount 1 Link to comment Share on other sites More sharing options...
Maxandmov Posted May 28, 2014 Share Posted May 28, 2014 (edited) 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 May 28, 2014 by Maxandmov Link to comment Share on other sites More sharing options...
Recommended Posts