= 20 or 21 or 22???

Talk about making games.

= 20 or 21 or 22???

Postby stevenp » Wed Jan 30, 2008 4:32 pm

how would i give multiple values in 1 line?

if ( mana = 20 or 21 or 22)
{
do something
}

i tried with commas and periods, but it didnt work
User avatar
stevenp
 
Posts: 403
Joined: Sat Dec 22, 2007 12:49 pm
Location: canada, ontario
Score: 16 Give a positive score

Re: = 20 or 21 or 22???

Postby makslane » Wed Jan 30, 2008 4:42 pm

Code: Select all
if ( mana == 20 ||mana == 21 || mana == 22)
{
   //do something
}
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: = 20 or 21 or 22???

Postby stevenp » Wed Jan 30, 2008 4:47 pm

ty ^,^
User avatar
stevenp
 
Posts: 403
Joined: Sat Dec 22, 2007 12:49 pm
Location: canada, ontario
Score: 16 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron