View Single Post
  #15  
Old 06-19-2003, 07:46 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Quote:
Originally posted by DarkShadows_Legend
I've tried this a few times in Graal, but it doesn't seem to work, but it works in some other programming languages.

NPC Code:

//1st ex
if(var == (1||3)){
// do stuff
}
// 2nd ex.
if(playerdir == (1||3)){
//do stuff
}



It doesn't seem to work for me. I usually have to type out the whole thing as if(var == 1 || var == 3) // stuff

Has anyone else tried this before?
Do

NPC Code:

if (var in {1,3})

Reply With Quote