Jump to content
  • 0
Sign in to follow this  
dungpt8782

Pls help me to correct this code!

Question

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)

post-5314-0-95821800-1408700884_thumb.jpg

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.