new Info[MAX_PLAYERS][Level];
new Info[MAX_PLAYERS][Respeito];
new Info[MAX_PLAYERS][Dinheiro];
new Info[MAX_PLAYERS][Matou];
new Info[MAX_PLAYERS][Morreu];
new Info[MAX_PLAYERS][Horas];
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;
}
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(playerid,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;
}
}
new timer[MAX_PLAYERS];//topo gm
//onplayerconnect
timer[playerid] = SetTimerEx("DarExp",600000,true,"%d",playerid);
//onplayerdisconnect
KillTimer(timer[playerid]);
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( ![]() C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn( ![]() 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 ![]() C:\Documents and Settings\Toni Santolia\Desktop\GM\gamemodes\BPL.pwn(7 ![]() 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 ![]() 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. |
#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;
}
#include <a_samp> #include <dini> enum pinfo { Level, Respeito, Dinheiro, Matou, Morreu, Horas // o ultimo nunca se coloca virgula :D } 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; }
dini_IntSet(file,"Level",Info[id][Level]);
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; }
C:\Documents and Settings\thaw\Desktop\Erro.pwn(84) : error 017: undefined symbol "Info" C:\Documents and Settings\thaw\Desktop\Erro.pwn(84) : warning 215: expression has no effect C:\Documents and Settings\thaw\Desktop\Erro.pwn(84) : error 001: expected token: ";", but found "]" C:\Documents and Settings\thaw\Desktop\Erro.pwn(84) : error 029: invalid expression, assumed zero C:\Documents and Settings\thaw\Desktop\Erro.pwn(84) : fatal error 107: too many error messages on one line