Pls help me to correct this code!

dungpt8782

New member
Messages
63
Points
0
Age
43
Emulator
Pls help me to correct this code!

OnDevilDead: .mob--; if ( .mob == 25 || .mob == 5 ) announce "Devil Square : "+ .mob +" monster in round.", bc_map; else if ( .mob <= 0 ) { announce "You have 4s to next round", bc_map; sleep 1000; announce "You have 3s to next round", bc_map; sleep 1000; announce "You have 2s to next round", bc_map; sleep 1000; announce "You have 1s to next round", bc_map; sleep 1000; goto OnDevil2; } end;
And this is my error (attach file)

dv_error.jpg

 
Seems you're killing the moba without a player charactrr. The error appears because of that.

If the NPC is placed on a map (isn't a floating NPC) and you don't mind about not having a player attached, you can change all these bc_map to bc_map|bc_npc and you'll broadcast with the NPC as source, not a possibly unattached player character.

 
Seems you're killing the moba without a player charactrr. The error appears because of that.

If the NPC is placed on a map (isn't a floating NPC) and you don't mind about not having a player attached, you can change all these bc_map to bc_map|bc_npc and you'll broadcast with the NPC as source, not a possibly unattached player character.
i killed the mob, not use command to kill them. And after i killed last monster, script do <announce "You have 4s to next round"> and stop.

 
Oh, bummer, I forgot it. Use sleep2 script command instead of sleep, since sleep detaches the RID; sleep2 keeps it after the waiting time.

 
Last edited by a moderator:
Back
Top