What's the code for 'or' statements?

Game Editor comments and discussion.

What's the code for 'or' statements?

Postby BloodRedDragon » Mon Aug 16, 2010 5:59 pm

Just a quick question. I know you can have 'if' statements but is there a code for 'or' aswell?

Thanks,
BRD
Current projects:
Techno-Tank Arena: on hold
Techno-Tank SuperPortal (working title): 0.1%
Bowels of Galaxies: 35% (was a bit too optimistic)
User avatar
BloodRedDragon
 
Posts: 123
Joined: Tue Jan 29, 2008 10:07 pm
Location: The Underworld
Score: 5 Give a positive score

Re: What's the code for 'or' statements?

Postby Game A Gogo » Mon Aug 16, 2010 7:30 pm

if(YouLikeLife==1 || ILikeLife==1) // "||" is or in this case, && is and, > is greater, < is small, == is equal, >= greater or equal, <= smaller of equal, != not equal
{
//someone likes life!
}
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: What's the code for 'or' statements?

Postby BloodRedDragon » Tue Aug 17, 2010 9:13 am

Thanks. You've been helping me a lot lately, so Im'a gonna give you a point!! Oh and i don't really know where to find the symbol for 'and' on my keyboard... :?
Current projects:
Techno-Tank Arena: on hold
Techno-Tank SuperPortal (working title): 0.1%
Bowels of Galaxies: 35% (was a bit too optimistic)
User avatar
BloodRedDragon
 
Posts: 123
Joined: Tue Jan 29, 2008 10:07 pm
Location: The Underworld
Score: 5 Give a positive score

Re: What's the code for 'or' statements?

Postby lcl » Tue Aug 17, 2010 1:34 pm

BloodRedDragon wrote:Thanks. You've been helping me a lot lately, so Im'a gonna give you a point!! Oh and i don't really know where to find the symbol for 'and' on my keyboard... :?


Hold shift down and press 6 at the top of keyboard.
Put two of these & marks for 'and'. :D

And for getting the symbol for 'or' hold Alt Gr and press button on left of 'z'. It's <> button.
This way you can make '|' mark, and two of these work as 'or'. :D
Last edited by lcl on Tue Aug 17, 2010 1:40 pm, edited 1 time in total.
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: What's the code for 'or' statements?

Postby Game A Gogo » Tue Aug 17, 2010 1:38 pm

lcl wrote:And for getting the symbol for 'or' hold Alt Gr and press button on right of 'z'. It's <> button.
This way you can make '|' mark, and two of these work as 'or'. :D


not all keyboards are layered the same! my | is above enter, I have to press Shift and \ :D
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: What's the code for 'or' statements?

Postby lcl » Tue Aug 17, 2010 1:41 pm

:o That's interesting... :lol:
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: What's the code for 'or' statements?

Postby Game A Gogo » Tue Aug 17, 2010 3:49 pm

Most likely because I have Canadian standard... but there are a couple of USA's laying around in Canada too :P
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: What's the code for 'or' statements?

Postby BloodRedDragon » Wed Aug 18, 2010 1:45 pm

yeah, shift and six gives me ^. Some keyboards are different. Ah, it's seven on mine, i didn't realise that & was an and symbol. :mrgreen:
Current projects:
Techno-Tank Arena: on hold
Techno-Tank SuperPortal (working title): 0.1%
Bowels of Galaxies: 35% (was a bit too optimistic)
User avatar
BloodRedDragon
 
Posts: 123
Joined: Tue Jan 29, 2008 10:07 pm
Location: The Underworld
Score: 5 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron