PDA

View Full Version : Need Help About Integer.


2k16
17/04/2016, 12:06 PM
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

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.

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.

2k16
17/04/2016, 12:22 PM
Bump

Misiur
17/04/2016, 04:58 PM
You return 1 from your GetClanScores function.

stock GetClanScores(clan[])
{
return yoursql_get_field_int(SQL:0, "clans/scores", yoursql_get_row(SQL:0, "clans", "name = %s", clan));
}