Page 1 of 1

Health Problem

PostPosted: Wed Aug 25, 2010 5:14 pm
by PWNED
Hey I was in the progress of making a game and I got stuck on this piece of script.

Code: Select all
if (Health_NUM.textNumber >= 1);

{
    (Health_NUM.textNumber = Health_NUM.textNumber -1);
}

else

 {
     DestroyActor("Event Actor");
 }



and when I hit ok it says
Error Line 7: Expected ;

do you know whats wrong???

Re: Health Problem

PostPosted: Wed Aug 25, 2010 7:37 pm
by jimmynewguy
take the semi colon ";" out of line 1
Code: Select all
if (Health_NUM.textNumber >= 1)


and take the parenthesis out of line 4 "()"
Code: Select all
Health_NUM.textNumber = Health_NUM.textNumber -1;


And not necessary but it's a lot easier to type this for line 4
Code: Select all
Health_NUM.textNumber -=1;

than that whole thing