Hi Tom.

That makes sense, the problem is I'm not getting anything else to work either.


currently, I'm trying to display a set of list boxes which count hp down as the D key is pressed, then the character dies at zero and the game exits.

something seems to be going wrong with both my conditional statements and my global variable though, and I'm uncertain as to what.

If anyone who knows such things could advise me I'd appreciate it, sinse I really can't understand what's wrong here.

int hp = 100;
string my_health = "hello, my hp is currently";
int down = hp - 10;
void main ( )
{
keypressed = (key d, down);
}
If
(hp = 0);
{
alert = ("death", "Oh dear, I'm dead!") exit);
}
Else;
{
(alert("window", my_health + hp));
}


However, I stil can't get the blasted thing to do more than display a message. I'm trying to get it to count hp down from 100 to 0 at a rate of ten a turn displaying ten message boxes then a death message and exit, but even though I appear to have followed all the rules I stil get a bunch of errors.


----- Original Message ----- From: "Thomas Ward" <thomasward1...@gmail.com>
To: "Gamers Discussion list" <gamers@audyssey.org>
Sent: Thursday, March 25, 2010 9:01 AM
Subject: Re: [Audyssey] Script error irritation


Hi Dark,
One thing that stands out right away is you have a space between the
end of your statements and the semi-colon. You should never put a
space before the semi-colon. To declare a variable you should write it
like this.
int hp = 100;
Other than that nothing else stands out like a sore thumb. I hope this helps.



On 3/24/10, dark <d...@xgam.org> wrote:
Hi.

Well I've started on writing a script from scratch rather than using the
examples.

I thought the first step in creating a symple turn based combat game was
getting the game to display the characters' hp, ---- but it's not working
for some reason and I'm not exactly certain why.

Here's the code:

int hp = 100 ;
string my_health = "hello, my hp is currently" ;
;void main ( )
{
alert  "window", my_health + hp);
}
---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to
gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gam...@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.


---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gam...@audyssey.org.
If you have any questions or concerns regarding the management of the list, please send E-mail to gamers-ow...@audyssey.org.


---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gam...@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to