Error.
#1

Код:
C:\Documents and Settings\Andrius\Desktop\SAMP Studio\gamemodes\studio.pwn(486) : error 075: input line too long (after substitutions)
Line 486
pawn Код:
GameTextForPlayer(playerid,"~g~[CIVIL] Female",1500,4);}
That line including in:
pawn Код:
else if(classid == 52 || classid == 53 || classid == 54 || classid == 55 || classid == 56 || classid == 57 || classid == 58 || classid == 59 || classid == 60 || classid == 61 || classid == 62 || classid == 63 || classid == 64 || classid == 65 || classid == 66 || classid == 67 || classid == 68 || classid == 69 || classid == 70){
    GameTextForPlayer(playerid,"~g~[CIVIL] Female",1500,4);}
How to fix?
Reply
#2

The if() statement is too long!
Use an switch() statement.
Reply
#3

The line is too long, what couldn't you understand?
Reply
#4

That's might work.
pawn Код:
else if((classid>=52)&&(classid<=70))
Reply
#5

Menace, dont double post, you could edit previous one.

Whatis so hard in a switch statement?

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
  switch(classid)
  {
    case 0..5 : GameTextForPlayer(playerid,"~p~Cops ~n~spawn",1000,5);
    case 6..10 : GameTextForPlayer(playerid,"~b~Second ~n~spawn",1000,5);
    ... // go on
  }
}
And continue...
Reply
#6

Thanks :]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)