The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GiveItem not working
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#1
GiveItem not working

This is quickly becoming infuriating. I am triggering a script that is supposed to remove one item and replace it with another, but only the GiveItem is not working at all. Here's my script.

PHP Code: (Select All)
void PourPrecip(string &in precipstring &in acid_machine_bottle_empty04_2)
{
    
SetEntityActive("acid_machine_bottle_empty04_2"false);
    
SetEntityActive("acid_machine_bottle04_2"true);
    
RemoveItem("precip");
    
GiveItem("emptiness""glass_container""emptiness""glass_container.tga"1);
    
AddLocalVarInt("PrecipAdded"1);
    
PlaySoundAtEntity("""puzzle_add_chemical.snt""acid_machine_bottle04_2"1false);


Works: GiveItem("emptiness", "glass_container_mix_done", "emptiness", "glass_container_mix_done.tga", 1);
Doesn't work: GiveItem("emptiness", "glass_container", "emptiness", "glass_container.tga", 1);

What in the love of all things holy.
Everything else in this function is working perfectly, but it won't give me the Glass Jar. I've also tried using "glass_container.ent" instead of "glass_container" but that won't work either.

(This post was last modified: 05-29-2012, 07:38 AM by Damascus.)
05-29-2012, 06:20 AM
Find


Messages In This Thread
GiveItem not working - by Damascus - 05-29-2012, 06:20 AM
RE: GiveItem not working - by Putmalk - 05-29-2012, 06:26 AM
RE: GiveItem not working - by Damascus - 05-29-2012, 06:30 AM
RE: GiveItem not working - by Your Computer - 05-29-2012, 06:49 AM
RE: GiveItem not working - by FlawlessHappiness - 05-29-2012, 07:31 AM
RE: GiveItem not working - by Damascus - 05-29-2012, 07:37 AM
RE: GiveItem not working - by Putmalk - 05-29-2012, 01:31 PM
RE: GiveItem not working - by FlawlessHappiness - 05-29-2012, 02:27 PM
RE: GiveItem not working - by Damascus - 05-29-2012, 07:21 PM



Users browsing this thread: 1 Guest(s)