BAN [+REP]
#1

Receive a error!

Код HTML:
error 017: undefined symbol "mysql_fetch_int"
Код HTML:
new banquery[180], ip[16];
	GetPlayerIp(playerid, ip, 16);
	format(banquery, sizeof(banquery), "SELECT unban_time FROM `bans` WHERE ip = '%s'", ip);
    mysql_query(banquery);
    mysql_store_result();
    if(mysql_num_rows() != 0)
    {
        new unbantimestamp = mysql_fetch_int();
        if(unbantimestamp > gettime())
        {
            KickWithMessage(playerid, COLOR_LIGHTRED2, "You're banned from this server.");
        }
    }
Use MYSQL R34
Reply
#2

Quote:
Originally Posted by norton2
Посмотреть сообщение
Receive a error!

Код HTML:
error 017: undefined symbol "mysql_fetch_int"
Код HTML:
new banquery[180], ip[16];
	GetPlayerIp(playerid, ip, 16);
	format(banquery, sizeof(banquery), "SELECT unban_time FROM `bans` WHERE ip = '%s'", ip);
    mysql_query(banquery);
    mysql_store_result();
    if(mysql_num_rows() != 0)
    {
        new unbantimestamp = mysql_fetch_int();
        if(unbantimestamp > gettime())
        {
            KickWithMessage(playerid, COLOR_LIGHTRED2, "You're banned from this server.");
        }
    }
Use MYSQL R34
Код HTML:
new banquery[180], ip[16];
	GetPlayerIp(playerid, ip, 16);
	format(banquery, sizeof(banquery), "SELECT unban_time FROM `bans` WHERE ip = '%s'", ip);
    mysql_query(banquery);
    mysql_store_result();
    if(mysql_num_rows() != 0)
    {
        new unbantimestamp = mysql_fetch_row_format();
        if(unbantimestamp > gettime())
        {
            KickWithMessage(playerid, COLOR_LIGHTRED2, "You're banned from this server.");
        }
    }
Try this
Reply
#3

Error:
Код HTML:
(2202) : warning 202: number of arguments does not match definition
Line:
Код HTML:
new unbantimestamp = mysql_fetch_row_format();
Reply
#4

PHP код:
new banquery[180], ip[16];
    
GetPlayerIp(playeridip16);
    
format(banquerysizeof(banquery), "SELECT unban_time FROM `bans` WHERE ip = '%s'"ip);
    
mysql_query(banquery);
    
mysql_store_result();
    if(
mysql_num_rows() != 0)
    {
        if(
mysql_fetch_row_format(banquery)
        {
            
KickWithMessage(playeridCOLOR_LIGHTRED2"You're banned from this server.");
        }
    }  
    
mysql_free_result();
    return 
1;

try this?
Reply
#5

Код HTML:
error 035: argument type mismatch (argument 1)
Line:
Код HTML:
mysql_free_result();
Reply
#6

Quote:
Originally Posted by norton2
Посмотреть сообщение
Код HTML:
error 035: argument type mismatch (argument 1)
Line:
Код HTML:
mysql_free_result();
remove this and check
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)