fatal error 107: too many error messages on one line
#1

Pawno Error:

Код:
\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.
All on the same line

Код:
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.
}
Help me.
Reply
#2

PHP код:
switch(listitem)
{
     case 
0Player[MAX_PLAYERS][pClass] = GCLASS_0;  // Pro Killer.
     
case 1Player[MAX_PLAYERS][pClass] = GCLASS_1// The Tyrant.

Reply
#3

Quote:
Originally Posted by Eoussama
Посмотреть сообщение
PHP код:
switch(listitem)
{
     case 
0Player[MAX_PLAYERS][pClass] = GCLASS_0;  // Pro Killer.
     
case 1Player[MAX_PLAYERS][pClass] = GCLASS_1// The Tyrant.

After doing that...

Код:
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
Reply
#4

PHP код:
switch(listitem// If be more than 2 classes
{
     case 
0Player [playerid][pClass] = [GCLASS_0]  // Professional.
     
case 1Player [playerid][pClass] = [GCLASS_1// Tyrant.
}
SpawnPlayer(playerid); // Do spawn 
Reply
#5

PHP код:
switch(listitem// If be more than 2 classes
{
     case 
0Player [playerid][pClass] = [GCLASS_0];  // you're missing semi colons here aswell
     
case 1Player [playerid][pClass] = [GCLASS_1]; // you're missing semi colons here aswell
}
SpawnPlayer(playerid); // Do spawn 
By the way, can I ask what is [GCLASS_x] ? It does not seem logic to have it under brackets.
Reply
#6

Quote:
Originally Posted by Troydere
Посмотреть сообщение
PHP код:
switch(listitem// If be more than 2 classes
{
     case 
0Player [playerid][pClass] = [GCLASS_0];  // you're missing semi colons here aswell
     
case 1Player [playerid][pClass] = [GCLASS_1]; // you're missing semi colons here aswell
}
SpawnPlayer(playerid); // Do spawn 
By the way, can I ask what is [GCLASS_x] ? It does not seem logic to have it under brackets.
G class is Grove Class,Pl0x, I'm missing semi colons? please tell where
Reply
#7

Remove them from the brackets, I don't know why did Eoussama added them anyway.

I already added the semi colons.

PHP код:
switch(listitem// If be more than 2 classes
{
    case 
0Player[playerid][pClass] = GCLASS_0;
    case 
1Player[playerid][pClass] = GCLASS_1;

Please refer to these following links so you can have an idea of what you're doing

https://sampwiki.blast.hk/wiki/Switch
https://sampwiki.blast.hk/wiki/Scripting_Basics
Reply
#8

Quote:
Originally Posted by Troydere
Посмотреть сообщение
Remove them from the brackets, I don't know why did Eoussama added them anyway.

I already added the semi colons.

PHP код:
switch(listitem// If be more than 2 classes
{
    case 
0Player[playerid][pClass] = GCLASS_0;
    case 
1Player[playerid][pClass] = GCLASS_1;

Please refer to these following links so you can have an idea of what you're doing

https://sampwiki.blast.hk/wiki/Switch
https://sampwiki.blast.hk/wiki/Scripting_Basics
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.
On line.
Код:
 468| case 0: Player [playerid][pClass] = [GCLASS_0]  // Professional.
         469 | case 1: Player [playerid][pClass] = [GCLASS_1] // Tyrant.
Reply
#9

Quote:
Originally Posted by ProBro
Посмотреть сообщение
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.
On line.
Код:
 468| case 0: Player [playerid][pClass] = [GCLASS_0]  // Professional.
         469 | case 1: Player [playerid][pClass] = [GCLASS_1] // Tyrant.
read his reply carefull please. the key on his reply
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)