Will this work? Really small question
#1

if(skinVal == 181,1,157,196,264,239,212,100,152,178,237,238,246, 256,257,64,63,87,15,134,213,198,259,241,32,100,142 ,60,239,132)

is my code, I want to check if the value entered is one of this skins, separated by commans e.g.
I want to check
if the skinVal is
181 or 1 or 157 etc
if it is do bla bla

I dont want to use || cause its too big, will pawno read this commas etc and that code successfully?
Reply
#2

no it wont


you could use switch instead


pawn Код:
switch (skinVal )
{
    case 181,1,157,196,264,239,212,100,152,178,237,238,246, 256,257,64,63,87,15,134,213,198,259,241,32,100,142 ,60,239,132:
    {
        //your code
    }
    default:
    {
        //some othercode
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)