Invalid Expression
#1

please help me track the issue hehe.

I've got a check VIP script however it's giving me a weird error.
Код:
CheckVIP(playerid)
{
    mysql_format(mysql, query, sizeof(query), "SELECT Expiry FROM VIP WHERE PlayerID = %d", pData[playerid][ID]);
    mysql_tquery(mysql, query, "f_CheckVIP", "i", playerid);
}
however, its returning me the following errors.
Код:
error 029: invalid expression, assumed zero
error 029: invalid expression, assumed zero
error 029: invalid expression, assumed zero
On the line Mysql_format(MySQL, query, sizeof(query, "SELECT Expiry FROM VIP WHERE PlayerID = %d, pData[playerid][ID]);

I have no idea why it's giving the error I taught I did this all correct.
Reply
#2

Where & how you defined query?
Reply
#3

There is no query string defined.. However it shouldn't throw that error tho (it should give the non defined var error) so idk.
Reply
#4

mysql_format(1, query, sizeof(query), "SELECT Expiry FROM VIP WHERE PlayerID = %d", pData[playerid][ID]);

Try that.
Reply
#5

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
Where & how you defined query?
I've defined the query however it shouldn't make a difference.
Reply
#6

Why don't you use format instead? Use the %q specifier to escape user inputs.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)