FutureVisions Posted December 10, 2010 Share Posted December 10, 2010 Why isn't this script adding caps to a merchant? Ref MyRef Short Add Short ThisAmount Begin GameMode If Add == 1 Set MyRef to GetLinkedRef MyRef.AddItem Caps001 ThisAmount Set Add to 2 Endif END Btw this is the script of another container, that's linked to the vendor chest container.Inicially I had tried to make this container owned by the merchant and add the caps to this container, but that didn't work either. Link to comment Share on other sites More sharing options...
dazzerfong Posted December 10, 2010 Share Posted December 10, 2010 Because by default Add would equal to 0. You should change the declaration to If Add == 0 and the resolution to Set Add to 1. Link to comment Share on other sites More sharing options...
FutureVisions Posted December 10, 2010 Author Share Posted December 10, 2010 (edited) Im seeting add to 1 on a dialogue result script. Same with the "ThisAmount" variable Edited December 10, 2010 by FutureVisions Link to comment Share on other sites More sharing options...
dazzerfong Posted December 10, 2010 Share Posted December 10, 2010 Oh, so in a previous script, you already declared it to be 1? I suggest using a global instead to make things constant. Link to comment Share on other sites More sharing options...
FutureVisions Posted December 10, 2010 Author Share Posted December 10, 2010 Shouldn't a global var have exactly the same effect? Another thing I'm not sure though, I have not waited for the container to respawn, but in any case shouldn't the caps also be imediatly available? Link to comment Share on other sites More sharing options...
Recommended Posts