Sorry, but i can't understand it
I want to give last date of user premium
I do this, but server show me SQL_FetchInt reported: Invalid query Handle 7e0077 (error: 2)
PHP Code:
public Action:CmdPremium(client, args)
{
if (g_bIsPremium[ client ] == 1)
{
new last_date;
CheckTest(client, last_date);
}
else
{
PrintToChat(client, "\x05%t \x01> \x05%t", "premium", "not activated");
PrintToChat(client, "\x05%t \x01> \x05%t", "premium", "buy link");
}
return Plugin_Handled;
}
CheckTest(client, last_date)
{
decl String:query[255];
decl String:auth[32];
GetClientAuthString(client, auth, sizeof(auth));
Format(query, sizeof(query), "SELECT last_date FROM premium_users_dust2only WHERE steam_id = '%s'", auth);
last_date = SQL_FetchInt(Database, 5);
PrintToChat(client, "Your last day in Unixtime: %i", last_date);
}
Please help me with this, i need that. I also locked in another plugins, but it don't work.