SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 17/04/2016, 12:06 PM   #1
2k16
Little Clucker
 
Join Date: Mar 2016
Posts: 21
Reputation: 0
Default Need Help About Integer.

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.
__________________
"You'll never know till you've tried."
2k16 is offline   Reply With Quote
Old 17/04/2016, 12:22 PM   #2
2k16
Little Clucker
 
Join Date: Mar 2016
Posts: 21
Reputation: 0
Default Re: Need Help About Integer.

Bump
__________________
"You'll never know till you've tried."
2k16 is offline   Reply With Quote
Old 17/04/2016, 04:58 PM   #3
Misiur
High-roller
 
Misiur's Avatar
 
Join Date: Jul 2009
Location: Poland
Posts: 2,528
Reputation: 556
Default Re: Need Help About Integer.

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));
}
Misiur is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 08:07 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.