header general

Help me on a script code,please

  • CaptainManiac
  • CaptainManiac's Avatar Topic Author
  • Cacodemon
  • Cacodemon
More
8 years 5 months ago #1 by CaptainManiac
Help me on a script code,please was created by CaptainManiac
Code:
if(ThingCount(t_wolfss,669) = 0) SetFont("dbigfont"); HudMessageBold(S:"NOOOOO.Look,Flynn,you were right,i mistaked by contracting with the devil.Please,correct my mistake.Ugh..auhh..";,0,CR_BRICK,512.0,384.0,0.5); terminate;
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

Please Log in or Create an account to join the conversation.

  • Blue Shadow
  • Blue Shadow's Avatar
  • Administrator
  • Administrator
More
8 years 5 months ago #2 by Blue Shadow
Replied by Blue Shadow on topic Help me on a script code,please
Code:
HudMessageBold(S:"NOOOOO.[...].Ugh..auhh..";,0,CR_BRICK,512.0,384.0,0.5); ^ |

Between the semi-colon and comma there, the type (see HudMessage ) should be passed there.

Please Log in or Create an account to join the conversation.

  • CaptainManiac
  • CaptainManiac's Avatar Topic Author
  • Cacodemon
  • Cacodemon
More
8 years 5 months ago - 8 years 5 months ago #3 by CaptainManiac
Replied by CaptainManiac on topic Help me on a script code,please
Still has the error.it shows that the error is in the condition part
Code:
If(ThingCount(T_WOLFSS,669) = 0)
Last edit: 8 years 5 months ago by CaptainManiac.

Please Log in or Create an account to join the conversation.

  • jaeden7734
  • jaeden7734's Avatar
  • Wraith
  • Wraith
More
8 years 5 months ago #4 by jaeden7734
Replied by jaeden7734 on topic Help me on a script code,please
If you are comparing two values, there must be 2x '='
Code:
If(ThingCount(T_WOLFSS,669) == 0) ^^

Please Log in or Create an account to join the conversation.

  • CaptainManiac
  • CaptainManiac's Avatar Topic Author
  • Cacodemon
  • Cacodemon
More
8 years 5 months ago #5 by CaptainManiac
Replied by CaptainManiac on topic Help me on a script code,please
THANK YOU SO MUCH!

Please Log in or Create an account to join the conversation.

  • CaptainManiac
  • CaptainManiac's Avatar Topic Author
  • Cacodemon
  • Cacodemon
More
8 years 5 months ago #6 by CaptainManiac
Replied by CaptainManiac on topic Help me on a script code,please
Code:
Script 3 (void) { If (ThingCountName("Evilmarine", 669) <= 0) setfont("dbigfont"); HudMessageBold(s:"Hi,i am script" ;HUDMSG_TYPEON|HUDMSG_LOG,0,CR_BRICK,512.0,384.0,0.5); }
That script is exeuted after a sequence,but the message has 2 problems:
The message does not show on the screen and it does not count actors properly.It is activated after spawning an BDv20b's EvilMarine and it shows the message in the log nor the monster is spawned or not

Please Log in or Create an account to join the conversation.

  • Blue Shadow
  • Blue Shadow's Avatar
  • Administrator
  • Administrator
More
8 years 5 months ago #7 by Blue Shadow
Replied by Blue Shadow on topic Help me on a script code,please
If the execution of the HudMessageBold call depends on the condition, then you need to put that code between curly brackets:
Code:
Script 3 (void) { If (ThingCountName("Evilmarine", 669) <= 0) { setfont("dbigfont"); HudMessageBold(s:"Hi,i am script" ;HUDMSG_TYPEON|HUDMSG_LOG,0,CR_BRICK,512.0,384.0,0.5); } }
Another thing: HUDMSG_TYPEON requires additional parameters. Here is the syntax:
Code:
HudMessageBold(text; HUDMSG_TYPEON, int id, int color, fixed x, fixed y, fixed holdTime, fixed typetime, fixed fadetime [, fixed alpha])
Figure out what you're missing, there.

Please Log in or Create an account to join the conversation.

  • CaptainManiac
  • CaptainManiac's Avatar Topic Author
  • Cacodemon
  • Cacodemon
More
8 years 5 months ago - 8 years 5 months ago #8 by CaptainManiac
Replied by CaptainManiac on topic Help me on a script code,please
i made it in curly brackets,put the missing,but still does not display on screen and does not count
Code:
Script 3 (void) { If (ThingCountName("Evilmarine", 669) == 0) { 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); } }
Last edit: 8 years 5 months ago by CaptainManiac.

Please Log in or Create an account to join the conversation.

  • MagicWazard
  • MagicWazard's Avatar
  • Moderator
  • Moderator
More
8 years 5 months ago #9 by MagicWazard
Replied by MagicWazard on topic Help me on a script code,please

CaptainManiac wrote: i made it in curly brackets,put the missing,but still does not display on screen and does not count

Code:
Script 3 (void) { If (ThingCountName("Evilmarine", 669) == 0) { 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); } }


You want this to appear if a monster is present, right? Then I think you want it to say "If (ThingCountName("Evilmarine", 669) >= 0)". Right now you're checking to see if the monster count is exactly zero. You probably want "greater than or equal to zero", which is what >= means.

Please Log in or Create an account to join the conversation.

  • CaptainManiac
  • CaptainManiac's Avatar Topic Author
  • Cacodemon
  • Cacodemon
More
8 years 5 months ago #10 by CaptainManiac
Replied by CaptainManiac on topic Help me on a script code,please
it is supposed to appear when the monster is dead or not present.It activates after monster spawn and it was supposed to show after death and worst-it prints oly in a console

Please Log in or Create an account to join the conversation.