registration system error -
MitsuK - 20.10.2018
this creating this registry system is donning these error but I can not find the error, please help me.
-------------------------------------------------------------------------------------------------------------------
line error
(221) : error 029: invalid expression, assumed zero
(230) : error 029: invalid expression, assumed zero
(230) : warning 215: expression has no effect
(230) : warning 215: expression has no effect
(230) : warning 215: expression has no effect
(230) : warning 215: expression has no effect
(230) : warning 215: expression has no effect
(230) : error 001: expected token: ";", but found ")"
(230) : error 029: invalid expression, assumed zero
(230) : fatal error 107: too many error messages on one line
5 Errors.
-------------------------------------------------------------------------------------------------------------------
(215)public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
(216){
(217) new file[90];
(21
format(file, sizeof(file), PASTA_CONTAS, PlayerName(playerid));
(219) switch(dialogid)
(220) {
(221) case DIALOG_REGISTRO:
(222) {
(223) if(response)
(224) {
(225) if(!strlen(inputtext))
(226) {
(227) new string[124];
(22
SendClientMessage(playerid, 0xFF0000AA, "[ERRO] Digite uma senha para se registrar!");
(229) format(string, sizeof(string), "Nome:%s/nConta: Sem Registro/nDigite senha !");
(230) ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "Brasil Game G -
Registro", string, "Registrar", "Cancelar");
(231) }
(232) else
(233) {
(234) DOF2_CreatFile(file);
(235) PlayerInfo[playerid][Dinheiro] = 5000;
(236) DOF2_SetInt(file, "Level", PlayerInfo[playerid][Level]);
(237) DOF2_SetInt(file, "Dinheiro", PlayerInfo[playerid][Dinheiro]);
(23
DOF2_SaveFile();
(239) SendClientMessage(playerid, 0x0080FFAA, "[SERVER] Sua conta foi criada com sucesso,
tenha um bom Jogo!");
(240) SpawnPlayer(playerid);
(241) }
(242) }
(243) }
(244) }
(245) return 1;
(246)}
------------------------------------------------------------------
Please people if you have seen this error speaks the line there and what it is.
Re: registration system error -
khRamin78 - 20.10.2018
show us \
DIALOG_REGISTRO
defination
Re: registration system error -
GangstaSunny. - 20.10.2018
Creating a new account to post the same stuff again. Wow...
Re: registration system error -
MitsuK - 20.10.2018
--------------------------
enum, new e define
enum pInfo{
Level,
Dinheiro,
Senha[24]
}
new PlayerInfo[MAX_PLAYERS][pInfo];
#define PASTA_CONTAS "Contas/%s.ini"
#define DIALOG_REGISTRO
---------------------------
these are the stock
stock PlayerName(playerid)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, sizeof(aname));
return aname;
}
stock CarregarContas(playerid)
{
new file[90];
format(file, sizeof(file),"Contas/%s.ini",PlayerName(playerid));
PlayerInfo[playerid][Level] = DOF2_GetInt(file,"Level");
PlayerInfo[playerid][Dinheiro] = DOF2_GetInt(file, "Dinheiro");
SendClientMessage(playerid, 0x86A857AA, "[SERVER] Seus dados foram carregados com sucesso!");
}
stock SalvarContas(playerid)
{
new file[90];
format(file, sizeof(file),"Contas/%s.ini",PlayerName(playerid));
DOF2_SetInfo(file, "Level", PlayerInfo[playerid][Level]);
DOF2_SetInfo(file, "Dinheiro",PlayerInfor[playerid][Dinheiro]);
DOF2_SaveFile();
}
Re: registration system error -
GangstaSunny. - 20.10.2018
PHP код:
#define DIALOG_REGISTRO
need to be
PHP код:
#define DIALOG_REGISTRO 0
But in my opinion you should go for a enum for dialogs
PHP код:
enum ServerDialogs {
DIALOG_REGISTRO,
DIALOG_LOGIN,
DIALOG_WHATEVER
//and so on
}
Re: registration system error -
MitsuK - 20.10.2018
Thank you, friend,
Now you have this error.
(234) : error 017: undefined symbol "DOF2_CreatFile"
Re: registration system error -
GangstaSunny. - 20.10.2018
https://sampforum.blast.hk/showthread.php?tid=422519
Re: registration system error -
MitsuK - 20.10.2018
friend I already have with dof2 set it on top.
Re: registration system error -
GangstaSunny. - 20.10.2018
If english is the langague
DOF2_Creat
eFile not DOF2_CreatFile
Re: registration system error -
v1k1nG - 21.10.2018
Running queries every 10 mins no, using dini yes.
Lol
Re: registration system error -
GangstaSunny. - 21.10.2018
Quote:
Originally Posted by v1k1nG
Running queries every 10 mins no, using dini yes.
Lol
|
He decided to.
And i m using file-based logs instead of dropping it to mysql. Intern file-writing will always be faster in this way.
Re: registration system error -
v1k1nG - 21.10.2018
Ok but read thread description.