Need Help About Integer. - 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: Need Help About Integer. (
/showthread.php?tid=605309)
Need Help About Integer. -
2k16 - 17.04.2016
Hello. I've some problem with my script. I'm using a Clan System by
VinPure.
and i change it from SQlite to Easy SQlite include by
Gammix.
the problem is, when i called function GetClanScore as integer %i
HTML Code:
format(string, sizeof(string), "** "WHITE"Clan Scores: %i", GetClanScores(GetPlayerClan(playerid)));
SendClientMessage(playerid, red, string);
Result:
** Clan Scores: 0
In the database show my clan has 20 scores.
HTML Code:
stock GetClanScores(clan[])
{
yoursql_get_field_int(SQL:0, "clans/scores", yoursql_get_row(SQL:0, "clans", "name = %s", clan));
return 1;
}
I hope you understand my problem.
Re: Need Help About Integer. -
2k16 - 17.04.2016
Bump
Re: Need Help About Integer. -
Misiur - 17.04.2016
You return 1 from your GetClanScores function.
pawn Code:
stock GetClanScores(clan[])
{
return yoursql_get_field_int(SQL:0, "clans/scores", yoursql_get_row(SQL:0, "clans", "name = %s", clan));
}