#1

erro na hora de compilar


C:\Documents and Settings\Igor\Desktop\Sever 0.3b\gamemodes\BRASIL MATA MATA UNDERGROUND.pwn(224) : error 001: expected token: "{", but found "-identifier-"

C:\Documents and Settings\Igor\Desktop\Sever 0.3b\gamemodes\BRASIL MATA MATA UNDERGROUND.pwn(224 -- 225) : warning 215: expression has no effect

C:\Documents and Settings\Igor\Desktop\Sever 0.3b\gamemodes\BRASIL MATA MATA UNDERGROUND.pwn(225) : error 001: expected token: ";", but found "case"

C:\Documents and Settings\Igor\Desktop\Sever 0.3b\gamemodes\BRASIL MATA MATA UNDERGROUND.pwn(225) : error 014: invalid statement; not in switch

C:\Documents and Settings\Igor\Desktop\Sever 0.3b\gamemodes\BRASIL MATA MATA UNDERGROUND.pwn(225) : fatal error 107: too many error messages on one line

Se alguem saber q erros sao esses e pq ta dando posta ai por favor
Reply
#2

Ta Faltando um
Код:
{
Ou um
Код:
;
E se quiser ajuda e so postar as linhas.
Reply
#3

no case...
Reply
#4

mechi la dai fico so estes dois erros olha ai essas sao as linhas dos erros

case 0: format(string, sizeof(string), "%s saiu do server, VOLTE SEMPRE! (perda de conexгo)", pName);

SendClientMessageToAll(0xAAAAAAAA, string);

os erros q deram nesses foram

C:\Documents and Settings\Igor\Desktop\Sever 0.3b\gamemodes\BRASIL MATA MATA UNDERGROUND.pwn(224) : error 001: expected token: "{", but found "case"

C:\Documents and Settings\Igor\Desktop\Sever 0.3b\gamemodes\BRASIL MATA MATA UNDERGROUND.pwn(227) : error 002: only a single statement (or expression) can follow each "case"

C:\Documents and Settings\Igor\Desktop\Sever 0.3b\gamemodes\BRASIL MATA MATA UNDERGROUND.pwn(227) : warning 215: expression has no effect

os outros q postei antes resolvi dois agora so tem esses erros ai
Reply
#5

voce deve ter feito mais ou menos assim:

pawn Код:
switch(reason)
case 0: //codigo
case 1: //codigo
case 2: //codigo
}
ou seja ta faltando { ali:

pawn Код:
switch(reason)
{
case 0: //codigo
case 1: //codigo
case 2: //codigo
}
posta o resto do cуdigo (provavelmente o OnPlayerDisconnect) q fica mais facil pra gente te ajudar..
Reply
#6

fico so um erro fico so esse agora nesta linha agora

SendClientMessageToAll(0xAAAAAAAA, string);

C:\Documents and Settings\Igor\Desktop\Sever 0.3b\gamemodes\BRASIL MATA MATA UNDERGROUND.pwn(22 : error 002: only a single statement (or expression) can follow each "case"

C:\Documents and Settings\Igor\Desktop\Sever 0.3b\gamemodes\BRASIL MATA MATA UNDERGROUND.pwn(22 : warning 215: expression has no effect



public OnPlayerDisconnect(playerid, reason)
{
Object_OnPlayerDisconnect(playerid, reason);
new pName[MAX_PLAYER_NAME];
new string[56];
GetPlayerName(playerid, pName, sizeof(pName));
switch(reason)
{
case 0: format(string, sizeof(string), "%s saiu do server, VOLTE SEMPRE! (perda de conexгo)", pName);
case 1: format(string, sizeof(string), "%s cansou de jogar e saiu, VOLTE SEMPRE! (saiu)", pName);
case 2: format(string, sizeof(string), "%s Foi contra as regras e saiu, FLW! (Kick/ban)", pName);
SendClientMessageToAll(0xAAAAAAAA, string);
}
Reply
#7

Na verdade, pra cada case, vocк sу pode usar uma vez cada definiзгo.

Ou seja, vocк nгo pode usar pName para todos os Cases.
Reply
#8

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
Object_OnPlayerDisconnect(playerid, reason);
new pName[MAX_PLAYER_NAME];
new string[56];
GetPlayerName(playerid, pName, sizeof(pName));
switch(reason)
{
case 0: format(string, sizeof(string), "%s saiu do server, VOLTE SEMPRE! (perda de conexгo)", pName);
case 1: format(string, sizeof(string), "%s cansou de jogar e saiu, VOLTE SEMPRE! (saiu)", pName);
case 2: format(string, sizeof(string), "%s Foi contra as regras e saiu, FLW! (Kick/ban)", pName);
}
SendClientMessageToAll(0xAAAAAAAA, string);
}
ao post acima: nгo й isso, o meu OnPlayerDisconnect й parecido com o dele, sу muda as mensagens, e nгo da erro. Acontece que tava faltando uma '}'
Reply
#9

Valew cara deu certo
muito obrigado
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)