Doubts/Problems with Timers, doesn't work

Nidhogg

New member
Messages
18
Points
0
Hello there C:

Here is my Code, and I think here is where I'm getting the error I have:

RespawnNivel1: OnTimer0: attachnpctimer; set $@npcaesconder$,""+strnpcinfo(0)+""; npctalk "Espera | "+$@npcaesconder$+""; initnpctimer ""+strnpcinfo(0)+""; end; OnTimer1: stopnpctimer ""+strnpcinfo(0)+""; npctalk "Listo | "+$@npcaesconder$+""; detachnpctimer; end;
I have multiple NPCs running on the same script (duplicates), so that's why I write "+strnpcinfo(0)+" on the arguments.

The error I got when running is that, ingame, the NPC doesn't show me the things on OnTimer1: label, and I don't know why,

the NPC says "Espera | 'NPCname'", but never says "Listo | 'NPCname'" :C

Help please C:

Thank you ;D

 
Last edited by a moderator:
I think you have a different view on OnTimer.

try to read this [WIKI] initnpctimer

I don't know why,

the NPC says "Espera | 'NPCname'", but never says "Listo | 'NPCname'" :C

Help please C:

Thank you ;D
Because you set it in wrong location..

RespawnNivel1:+ set $@npcaesconder$,""+strnpcinfo(0)+""; OnTimer0: attachnpctimer;- set $@npcaesconder$,""+strnpcinfo(0)+""; npctalk "Espera | "+$@npcaesconder$+""; initnpctimer ""+strnpcinfo(0)+""; end; OnTimer1: stopnpctimer ""+strnpcinfo(0)+""; npctalk "Listo | "+$@npcaesconder$+""; detachnpctimer; end;
+ Add this code

- Remove this code

Code:
		set $@npcaesconder$,""+strnpcinfo(0)+""; //should set outside 
 
Thank you for your reply C:

Yes, that works
default_biggrin.png
! Thank you for your help!

 
Back
Top