#  ![](https://www.realm667.com/media/kunena/topic_icons/realm667/user/map.png) Help me on a script code,please

##

- **MagicWazard**
- ![MagicWazard's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar517.png)
- Moderator
- ![Moderator](https://www.realm667.com/media/kunena/ranks/rank_20_barrel.png)

 Less More- Posts: 808
-
-
-
-

   10 years 6 months ago [\#3199](#3199) by MagicWazard  Replied by *MagicWazard* on topic *[Help me on a script code,please](https://www.realm667.com/forum/the-workshop/600-help-me-on-a-script-code-please?start=10#3199 "That part f code returns me error when compiling that says: "missing )"

I don't see any missing closeing brackets.Can someone help me how to fix it?
I pre-thank you")*

Code:

script 3 (void) { While(ThingCountName("Evilmarine", 669) &gt; 0) Delay(35); setfont("dbigfont"); HudMessageBold(s:"Hi,i am script" ;HUDMSG_TYPEON|HUDMSG_LOG,0,CR_BRICK,512.0,384.0,1.0,0.5,0,255); }

Try this then. It's a modified version of the example from the [ ThingCount wiki page](http://zdoom.org/wiki/ThingCount) that waits until all the specified monsters are dead. An "If" statement will run right away, but only once. A "while" statement will keep running until it's no longer true.

Also, you are looking for an "Evilmarine" with a TID of "669". Are you assigning that monster the TID correctly? If there's only one "Evilmarine" in the map at the time, you can omit the TID altogether.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC82MDAtaGVscC1tZS1vbi1hLXNjcmlwdC1jb2RlLXBsZWFzZT9zdGFydD0xMA==&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **CaptainManiac**
- ![CaptainManiac's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar4791.png) Topic Author
- Cacodemon
- ![Cacodemon](https://www.realm667.com/media/kunena/ranks/rank_8_caco.png)

 Less More- Posts: 103
-
-
-
-

   10 years 6 months ago - 10 years 6 months ago [\#3200](#3200) by CaptainManiac  Replied by *CaptainManiac* on topic *[Help me on a script code,please](https://www.realm667.com/forum/the-workshop/600-help-me-on-a-script-code-please?start=10#3200 "That part f code returns me error when compiling that says: "missing )"

I don't see any missing closeing brackets.Can someone help me how to fix it?
I pre-thank you")*

 you were right. i used this to spawn the enemy: Code:

SpawnSpotFacing("EvilMarine",12,669);

and was part of the previous script.Yes,the problem is there,cus of that the script does not detect the enemy 669(cus it does not exist) and runs away(and then terminates as an runaway script)

 Last edit: 10 years 6 months ago by CaptainManiac. Reason: Missing important information

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC82MDAtaGVscC1tZS1vbi1hLXNjcmlwdC1jb2RlLXBsZWFzZT9zdGFydD0xMA==&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

[Powered by](https://www.realm667.com/forum/credits) [Kunena Forum](https://www.kunena.org)
