15.01.2012, 04:02
Quote:
26 erros kkk se quiser as linhas so pedir.
C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(5) : error 017: undefined symbol "Level" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(5) : error 009: invalid array size (negative, zero or out of bounds) C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(6) : error 017: undefined symbol "Respeito" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(6) : error 021: symbol already defined: "Info" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(7) : error 017: undefined symbol "Dinheiro" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(7) : error 021: symbol already defined: "Info" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn( : error 017: undefined symbol "Matou" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn( : error 021: symbol already defined: "Info" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(9) : error 017: undefined symbol "Morreu" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(9) : error 021: symbol already defined: "Info" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(10) : error 017: undefined symbol "Horas" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(10) : error 021: symbol already defined: "Info" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(16) : error 017: undefined symbol "playerid" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(20) : error 017: undefined symbol "Level" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(21) : error 017: undefined symbol "Respeito" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(22) : error 017: undefined symbol "Dinheiro" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(23) : error 017: undefined symbol "Morreu" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(24) : error 017: undefined symbol "Matou" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(25) : error 017: undefined symbol "Horas" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(2 : warning 209: function "SalvarPlayer" should return a value C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(7 : warning 225: unreachable code C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(257) : error 017: undefined symbol "Level" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(25 : error 017: undefined symbol "Respeito" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(259) : error 017: undefined symbol "Dinheiro" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(260) : error 017: undefined symbol "Matou" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(261) : error 017: undefined symbol "Morreu" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(262) : error 017: undefined symbol "Horas" C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(263) : error 017: undefined symbol "Level" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 26 Errors. |
pawn Код:
#include <a_samp>
#include <dini>
enum pinfo
{
Level,
Respeito,
Dinheiro,
Matou,
Morreu,
Horas,
}
new Info[MAX_PLAYERS][pinfo];
public OnPlayerConnect(playerid)
{
new file[50];
GetPlayerName(playerid,file,50);
format(file,50,"%s.ini",file);
if(dini_Exists(file))
{
ShowPlayerDialog(playerid,1001,DIALOG_STYLE_INPUT,"Login","Digite a senha abaixo","Logar","Fechar");
return 1;
}else{
ShowPlayerDialog(playerid,1002,DIALOG_STYLE_INPUT,"Registro","Digite a senha abaixo","Registrar","Fechar");
return 1;
}
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new file[50];
GetPlayerName(playerid,file,50);
format(file,50,"%s.ini",file);
if(dialogid == 1001)//login
{
if(!response)return Kick(playerid);
if(strcmp(inputtext,dini_Get(file,"Senha"),false)==0)
{
Info[playerid][Level] = dini_Int(file,"Level");
Info[playerid][Respeito] = dini_Int(file,"Respeito");
Info[playerid][Dinheiro] = dini_Int(file,"Dinheiro");
Info[playerid][Matou] = dini_Int(file,"Matou");
Info[playerid][Morreu] = dini_Int(file,"Morreu");
Info[playerid][Horas] = dini_Int(file,"Horas");
SetPlayerScore(playerid,Info[playerid][Level]);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid,Info[playerid][Dinheiro]);
SpawnPlayer(playerid);
}else{
ShowPlayerDialog(playerid,1001,DIALOG_STYLE_INPUT,"Login","Digite a senha abaixo\nSenha errada noob","Logar","Fechar");
return 1;
}
}
if(dialogid== 1002)//registro
{
if(response)
{
if(strlen(inputtext) == 0)return ShowPlayerDialog(playerid,1002,DIALOG_STYLE_INPUT,"Registro","Digite a senha abaixo","Logar","Fechar");
dini_Create(file);
dini_Set(file,"Senha",inputtext);
dini_IntSet(file,"Level",1);
dini_IntSet(file,"Respeito",0);
dini_IntSet(file,"Dinheiro",0);
dini_IntSet(file,"Morreu",0);
dini_IntSet(file,"Matou",0);
dini_IntSet(file,"Horas",0);
SpawnPlayer(playerid);//registrado
}
}
return 1;
}
public OnPlayerDisconnect(playerid)
{
SalvarPlayer(playerid);
return 1;
}
stock SalvarPlayer(id)
{
new file[50];
GetPlayerName(id,file,50);
format(file,50,"%s.ini",file);
if(dini_Exists(file))
{
dini_IntSet(file,"Level",Info[id][Level]);
dini_IntSet(file,"Respeito",Info[id][Respeito]);
dini_IntSet(file,"Dinheiro",Info[id][Dinheiro]);
dini_IntSet(file,"Morreu",Info[id][Morreu]);
dini_IntSet(file,"Matou",Info[id][Matou]);
dini_IntSet(file,"Horas",Info[id][Horas]);
return 1;
}
return 1;
}