SA-MP Forums Archive
WARNING RETURN VALUE - 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)
+--- Thread: WARNING RETURN VALUE (/showthread.php?tid=606993)



WARNING RETURN VALUE - Pearson - 13.05.2016


HELP


Re: WARNING RETURN VALUE - Pearson - 13.05.2016

if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 10575, DIALOG_STYLE_INPUT, "Gatexili Akauntis Dabruneba", "Chaweret Gatexili Akauntis ZUSTI Saxeli Serverze", "Ok", "Gauqmeba");
new hgh[300];
format(hgh, sizeof(hgh), "SELECT * FROM `accounts` WHERE name = '%s'",(inputtext));
mysql_queryaaa(hgh);
mysql_store_result();
if(mysql_fetch_row_format(hgh))
{
new regmyip[16];
new myip[16];
//new keyip[30];
new parolii[50];
GetPlayerIp(playerid,myip,sizeof(myip));
BaseGet("pIpReg",regmyip);
//BaseGet("pKeyip",keyip);
BaseGet("pKey",parolii);
if(GetString(myip,regmyip))
{
new ragaca[123];
format(hgh, sizeof(hgh), " Saxeli: %s |> Paroli: %s ",(inputtext),parolii);
SendClientMessage(playerid, COLOR_LIGHTRED, hgh);
format(ragaca, sizeof(ragaca), "UPDATE accounts SET pEmail = 'None' WHERE name = '%s'",(inputtext));
mysql_queryaaa(ragaca);
}
else SendClientMessage(playerid, COLOR_GRAD1, "Es Akaunti Ar Aris Registrirebuli Shens IP'ze");
}
else SendClientMessage(playerid, COLOR_GRAD1, "Aseti Akaunti Ar Arsebobs Serveris Monacemta Bazashi");
mysql_free_result();
}



HERES CODE


Re: WARNING RETURN VALUE - KevinReinke - 13.05.2016

mysql_fetch_row_format doesn't return any values. You can't use it in a if-statement.


Re: WARNING RETURN VALUE - Pearson - 13.05.2016

Why Is Here Warning?


Re: WARNING RETURN VALUE - BloodyRP - 13.05.2016

Quote:
Originally Posted by KevinReinke
Посмотреть сообщение
mysql_fetch_row_format doesn't return any values. You can't use it in a if-statement.
It can.

https://sampwiki.blast.hk/wiki/MySQL#mysql_fetch_row_format
Код:
Return Values:
1 if fetched, 0 if there are no more rows to be fetched.



Re: WARNING RETURN VALUE - KevinReinke - 13.05.2016

Quote:
Originally Posted by BloodyRP
Посмотреть сообщение
It can.

https://sampwiki.blast.hk/wiki/MySQL#mysql_fetch_row_format
Код:
Return Values:
1 if fetched, 0 if there are no more rows to be fetched.
The warning says otherwise.


Re: WARNING RETURN VALUE - BloodyRP - 13.05.2016

Quote:
Originally Posted by KevinReinke
Посмотреть сообщение
The warning says otherwise.
may be he have not default include or something other, dunno. But for sure this func can return a value.