Need hel with MSQL. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need hel with MSQL. (
/showthread.php?tid=259505)
Need hel with MSQL. -
Type-R - 04.06.2011
Hello, i'm knew with MSQL, i am trying to do ar registration and login, but i get one error on dialog. Error Says:
Код:
(2436) : warning 225: unreachable code
(2436) : error 029: invalid expression, assumed zero
(2436) : warning 215: expression has no effect
(2436) : error 001: expected token: ";", but found "if"
here's the script on dialog:
Код:
if(dialogid == 0) //Jei dialogid bus lygus 0
{
new vardas[MAX_PLAYER_NAME], string[180];
GetPlayerName(playerid, vardas, sizeof(vardas));
if(response)
{
if(SaskYra[playerid])
format(string, sizeof(string), "{FFFFFF}Zaidejas {FFAF00}%s {FFFFFF}yra registruotas.\n{FFFFFF}Iveskite slaptazodi noredami prisijungti:",vardas);
return ShowPlayerDialog(playerid,200,DIALOG_STYLE_INPUT,"{A3E4FF}Prisijungimas",string,"Prisijungti","Atsaukti");
else if(!SaskYra[playerid]) // the error line
format(string, sizeof(string), "{FFFFFF}Zaidejo {FFAF00}%s {FFFFFF}registracija.\n{FFFFFF}Iveskite norima slaptazodi:",vardas);
return ShowPlayerDialog(playerid,201,DIALOG_STYLE_INPUT,"{A3E4FF}Registracija",string,"Registruotis","Atsaukti");
}
else
{
SendClientMessage(playerid, raudona, "[FunZoneLT]>> Jus turite sutikti su taisyklemis, pries zaidziant!");
Kick(playerid);
}
}
Does anyone know whats the problem?
Re: Need hel with MSQL. -
[KO]KillerThriller - 04.06.2011
pawn Код:
if(dialogid == 0) //Jei dialogid bus lygus 0
{
new vardas[MAX_PLAYER_NAME], string[180];
GetPlayerName(playerid, vardas, sizeof(vardas));
if(response)
{
if(SaskYra[playerid])
format(string, sizeof(string), "{FFFFFF}Zaidejas {FFAF00}%s {FFFFFF}yra registruotas.\n{FFFFFF}Iveskite slaptazodi noredami prisijungti:",vardas);
return ShowPlayerDialog(playerid,200,DIALOG_STYLE_INPUT,"{A3E4FF}Prisijungimas",string,"Prisijungti","Atsaukti");
else if(SaskYra[playerid] == 0) // the error line
format(string, sizeof(string), "{FFFFFF}Zaidejo {FFAF00}%s {FFFFFF}registracija.\n{FFFFFF}Iveskite norima slaptazodi:",vardas);
return ShowPlayerDialog(playerid,201,DIALOG_STYLE_INPUT,"{A3E4FF}Registracija",string,"Registruotis","Atsaukti");
}
else
{
SendClientMessage(playerid, raudona, "[FunZoneLT]>> Jus turite sutikti su taisyklemis, pries zaidziant!");
Kick(playerid);
}
}
I presume you want to check if the var SaskYra[playerid] is 0
Re: Need hel with MSQL. -
Type-R - 04.06.2011
Exact same error :/