SA-MP Forums Archive
msqyl error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: msqyl error (/showthread.php?tid=608223)



msqyl error - Jimmi - 29.05.2016

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


Re: msqyl error - luke49 - 29.05.2016

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


Re: msqyl error - Jimmi - 29.05.2016

I do not understand how to replace ...


Re: msqyl error - luke49 - 29.05.2016

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


Re: msqyl error - Jimmi - 29.05.2016

what?


Re: msqyl error - d3ll - 29.05.2016

PHP код:
forward OnCheckTagType(TagName[]);
stock MySQLCheckTag( TagName[] ) {
    new 
iQuery[128];
    
mysql_format(iQuery, sizeof(iQuery), "SELECT `ID` FROM `Clans` WHERE `ClanTAG` = '%e'", TagName);
    
mysql_tquery(handle, iQuery, "OnCheckTagType", "s", TagName);
}
public 
OnCheckTagType(TagName[]) {
    new 
rows, fields;
    
cache_get_data(rows, fields, handle);
    if(
rows) {
        new 
strid[5], intid;
        
cache_get_field_content(0, "ID", strid, handle); intid = strval(strid);
    } else {
        return 
0;
    }
    return 
1;
} 
If your using R33+


Re: msqyl error - luke49 - 29.05.2016

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 rows, fields;
cache_get_data(rows, fields, handle);
if (
rows) { ... 



Re: msqyl error - DRIFT_HUNTER - 29.05.2016

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.