msqyl error
#1

i have a error mysql compiling...
Код:
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(48444) : error 017: undefined symbol "mysql_store_result"
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(48445) : error 017: undefined symbol "mysql_num_rows"
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(48447) : error 017: undefined symbol "mysql_free_result"
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(48454) : error 017: undefined symbol "mysql_fetch_row"
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(48456) : error 017: undefined symbol "mysql_free_result"
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(48467) : error 017: undefined symbol "mysql_store_result"
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(48468) : error 017: undefined symbol "mysql_num_rows"
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(48470) : error 017: undefined symbol "mysql_free_result"
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(48477) : error 017: undefined symbol "mysql_fetch_row"
C:\Users\User\Documents\ValoareCuK\gamemodes\rworld.pwn(48479) : error 017: undefined symbol "mysql_free_result"
Hear :
Код:
stock MySQLCheckTag(TagName[])
{
	new query[128], escstr[30];
	mysql_real_escape_string(TagName, escstr);
	format(query, sizeof(query), "SELECT `ID` FROM clans WHERE `ClanTAG` = '%s'", escstr);
	mysql_query(handle, query);
	mysql_store_result();
	if (mysql_num_rows() == 0)
	{
	    mysql_free_result();
		return 0;
	}
	else
	{
		new strid[32];
		new intid;
		mysql_fetch_row(strid);
		intid = strval(strid);
	    mysql_free_result();
		return intid;
	}
}

stock MySQLCheckClan(ClanName[])
{
	new query[128], escstr[30];
	mysql_real_escape_string(ClanName, escstr);
	format(query, sizeof(query), "SELECT `ID` FROM clans WHERE `ClanName` = '%s'", escstr);
	mysql_query(handle, query);
	mysql_store_result();
	if (mysql_num_rows() == 0)
	{
	    mysql_free_result();
		return 0;
	}
	else
	{
		new strid[32];
		new intid;
		mysql_fetch_row(strid);
		intid = strval(strid);
	    mysql_free_result();
		return intid;
	}
}
I use mysql r39-5
Reply
#2

Does MySQL R39-5 use these functions?
https://sampwiki.blast.hk/wiki/MySQL/R33
Reply
#3

I do not understand how to replace ...
Reply
#4

Replace what? If they are not in use, just delete them...
Reply
#5

what?
Reply
#6

PHP код:
forward OnCheckTagType(TagName[]);
stock MySQLCheckTagTagName[] ) {
    new 
iQuery[128];
    
mysql_format(iQuerysizeof(iQuery), "SELECT `ID` FROM `Clans` WHERE `ClanTAG` = '%e'"TagName);
    
mysql_tquery(handleiQuery"OnCheckTagType""s"TagName);
}
public 
OnCheckTagType(TagName[]) {
    new 
rowsfields;
    
cache_get_data(rowsfieldshandle);
    if(
rows) {
        new 
strid[5], intid;
        
cache_get_field_content(0"ID"stridhandle); intid strval(strid);
    } else {
        return 
0;
    }
    return 
1;

If your using R33+
Reply
#7

Delete them: mysql_store_result, mysql_free_result, mysql_fetch_row and etc.

Your function:
PHP код:
if (mysql_num_rows() == 0
change as
PHP код:
new rowsfields;
cache_get_data(rowsfieldshandle);
if (
rows) { ... 
Reply
#8

You need older mysql plugin. Mysql R6.

https://sampforum.blast.hk/showthread.php?tid=56564

First post, at the bottom. Dont forget to update include.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)