[DUV] Salvamento de SCORE COM DINI
#1

Problemas
Quando vou Compilar da Esse Erro:

Quote:

warning 219: local variable "name" shadows a variable at a preceding level
error 012: invalid function call, not a valid address
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Linhas
pawn Код:
//-----------Desconectar-----------------------
public OnPlayerDisconnect(playerid, reason)
{
new name[MAX_PLAYER_NAME], string[44];
GetPlayerName(playerid, name, sizeof(name));
dini_IntSet("scores.ini",name(playerid),GetPlayerScore(playerid));
return 1;
}
//----------------------------------------------------------
Reply
#2

Filho Tenta FAzer Assim,
Troca por
pawn Код:
//-----------Desconectar-----------------------
public OnPlayerDisconnect(playerid, reason)
{

dini_IntSet("scores.ini",name(playerid),GetPlayerScore(playerid));
return 1;
}
//----------------------------------------------------------
No Final do GM
pawn Код:
stock name(playerid) {
 new name[255];
 GetPlayerName(playerid, name, 255);
 return name;
}
Reply
#3

Deu Certooooo ta Funcionando valeu

Mais Agora ta dando

Quote:

Warning 219: local variable "PlayerName" shadows a variable at a preceding level

na Linha 892

Aqui

pawn Код:
891:stock PlayerName(playerid) {
892:new PlayerName[255];
893:GetPlayerName(playerid, PlayerName, 255);
894:return PlayerName;
}
Reply
#4

Quote:
Originally Posted by BurrodaZero
Deu Certooooo ta Funcionando valeu

Mais Agora ta dando

Quote:

Warning 219: local variable "PlayerName" shadows a variable at a preceding level

na Linha 892

Aqui

pawn Код:
891:stock PlayerName(playerid) {
892:new PlayerName[255];
893:GetPlayerName(playerid, PlayerName, 255);
894:return PlayerName;
}
substitui o

pawn Код:
new PlayerName[255];
GetPlayerName(playerid, PlayerName, 255);
por

pawn Код:
new PlayerName[MAX_PLAYER_NAME]
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
Reply
#5

o Certo nгo seria
pawn Код:
new PlayerName[MAX_PLAYER_NAME];
Com Virgula no Final

Mesmo Assim Colocando a Virgula Continua essa warning
Reply
#6

Quote:
Originally Posted by BurrodaZero
o Certo nгo seria
pawn Код:
new PlayerName[MAX_PLAYER_NAME];
Com Virgula no Final

Mesmo Assim Colocando a Virgula Continua essa warning
nгo, virgula no final nгo pode
Reply
#7

muda o nome por exemplo

pawn Код:
new PlayerName[MAX_PLAYER_NAME]
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
para

pawn Код:
new PlayerNameez[MAX_PLAYER_NAME]
GetPlayerName(playerid, PlayerNameez, sizeof(PlayerNameez));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)