\gamemodes\Vs.pwn(469) : error 001: expected token: ":", but found "-identifier-" gamemodes\Vs.pwn(469) : error 032: array index out of bounds (variable "Player") gamemodes\Vs.pwn(469) : warning 215: expression has no effect gamemodes\Vs.pwn(469) : error 002: only a single statement (or expression) can follow each "case" gamemodes\Vs.pwn(469) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
467| switch(listitem) // If be more than 2 classes 468|{ 469|case 0 Player [MAX_PLAYERS][pClass]; = GCLASS_0; // Pro Killer. 470|case 1 Player [MAX_PLAYERS][pClass]; = GCLASS_1; // The Tyrant. }
switch(listitem)
{
case 0: Player[MAX_PLAYERS][pClass] = GCLASS_0; // Pro Killer.
case 1: Player[MAX_PLAYERS][pClass] = GCLASS_1; // The Tyrant.
}
PHP код:
|
Alpha vs Delta\gamemodes\Vs.pwn(469) : error 002: only a single statement (or expression) can follow each "case" Alpha vs Delta\gamemodes\Vs.pwn(469) : error 029: invalid expression, assumed zero Alpha vs Delta\gamemodes\Vs.pwn(469) : warning 215: expression has no effect Alpha vs Delta\gamemodes\Vs.pwn(469) : error 001: expected token: ";", but found "]" Alpha vs Delta\gamemodes\Vs.pwn(469) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
467|switch(listitem) // If be more than 2 classes 468|{ 469|case 0: Player [playerid][pClass]; = [GCLASS_0] // Professional. 470|case 1: Player [playerid][pClass]; = [GCLASS_1] // Tyrant. } SpawnPlayer(playerid); // Do spawn
switch(listitem) // If be more than 2 classes
{
case 0: Player [playerid][pClass] = [GCLASS_0] // Professional.
case 1: Player [playerid][pClass] = [GCLASS_1] // Tyrant.
}
SpawnPlayer(playerid); // Do spawn
switch(listitem) // If be more than 2 classes
{
case 0: Player [playerid][pClass] = [GCLASS_0]; // you're missing semi colons here aswell
case 1: Player [playerid][pClass] = [GCLASS_1]; // you're missing semi colons here aswell
}
SpawnPlayer(playerid); // Do spawn
PHP код:
|
switch(listitem) // If be more than 2 classes
{
case 0: Player[playerid][pClass] = GCLASS_0;
case 1: Player[playerid][pClass] = GCLASS_1;
}
Remove them from the brackets, I don't know why did Eoussama added them anyway.
I already added the semi colons. PHP код:
https://sampwiki.blast.hk/wiki/Switch https://sampwiki.blast.hk/wiki/Scripting_Basics |
error 029: invalid expression, assumed zero gamemodes\Vs.pwn(468) : error 029: invalid expression, assumed zero gamemodes\Vs.pwn(468 -- 469) : warning 215: expression has no effect gamemodes\Vs.pwn(469) : error 001: expected token: ";", but found "case" gamemodes\Vs.pwn(469) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
468| case 0: Player [playerid][pClass] = [GCLASS_0] // Professional. 469 | case 1: Player [playerid][pClass] = [GCLASS_1] // Tyrant.
I have no idea why it's giving me this error :S v:
Код:
error 029: invalid expression, assumed zero gamemodes\Vs.pwn(468) : error 029: invalid expression, assumed zero gamemodes\Vs.pwn(468 -- 469) : warning 215: expression has no effect gamemodes\Vs.pwn(469) : error 001: expected token: ";", but found "case" gamemodes\Vs.pwn(469) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. Код:
468| case 0: Player [playerid][pClass] = [GCLASS_0] // Professional. 469 | case 1: Player [playerid][pClass] = [GCLASS_1] // Tyrant. |