Quote:
Originally Posted by Chompy
try use a sleep(.05); before doing it, if you have a timeout in the script, call the timeout after the sleep
|
I figured out what the real problem is now, after I tested it in a new npc
PHP Code:
function onActionServerside() {
switch(params[0]) {
case "p":
this.join("example1");
break;
case "l":
this.join("example2");
break;
}
}
The code inside the joins are not executed after they are joined, but on the second time I use it, after it has joined the first time, is this intended? And if so, can someone give me some hints towards getting around this? (Was breaking the npc up into "states" for example, to join different things at different times.
Edit: I realise its been almost a month since i posted this but I decided to go back and try to find out the problem because it was aggrivating me