Health Problem

Non-platform specific questions.

Health Problem

Postby PWNED » Wed Aug 25, 2010 5:14 pm

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???
PWNED
 
Posts: 16
Joined: Wed Jul 21, 2010 10:17 pm
Score: 0 Give a positive score

Re: Health Problem

Postby jimmynewguy » Wed Aug 25, 2010 7:37 pm

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
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest