SA-MP Forums Archive
mysql errors - 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: mysql errors (/showthread.php?tid=664777)



mysql errors - Kevinas100 - 10.03.2019

PHP Code:
stock loadDumus()
{
    new 
Query[255], vazonas;
    
format(Querysizeof(Query), "SELECT * FROM `NamaiSuDum` WHERE `ID` = 1");
    
mysql_query(Query);
    
mysql_store_result();
    
mysql_fetch_field_row(vazonas"VazonuUpgrade");    DumuInfo[vazonolvl] = vazonas;
    if(
DumuInfo[vazonolvl] == 1)
    {
        
CreateDynamicObject(743,2367.1001000,-1193.9000000,1055.5000000,0.0000000,0.0000000,0.0000000); //object(kb_pot_1) (1)
        
CreateDynamicObject(743,2365.8000000,-1193.9000000,1055.5000000,0.0000000,0.0000000,0.0000000); //object(kb_pot_1) (6)
        
CreateDynamicObject(743,2364.3999000,-1193.9000000,1055.5000000,0.0000000,0.0000000,0.0000000); //object(kb_pot_1) (7)
        
CreateDynamicObject(743,2362.8999000,-1193.9000000,1055.5000000,0.0000000,0.0000000,0.0000000); //object(kb_pot_1) (8)
    
}
    
mysql_free_result();
    return 
1;

everything compiles wonderfully, but mysql debug gives
CMySQLHandler::FetchField(VazonuUpgrade) - You cannot call this function now. (Reason: Fields/Rows are empty.)

while the VazonuUpgrade field isn't empty


Re: mysql errors - Infin1ty - 10.03.2019

What version of MySQL are you using? This looks like a very very old version of MySQL.
While we're trying to determine your MySQL version, please do get rid of the 'stock' keyword. Since you're using loadDumus() there is no need for the compiler to determine whether or not it should ignore the code if its being used or not.


Re: mysql errors - Kevinas100 - 10.03.2019

Quote:
Originally Posted by Infin1ty
View Post
What version of MySQL are you using? This looks like a very very old version of MySQL.
While we're trying to determine your MySQL version, please do get rid of the 'stock' keyword. Since you're using loadDumus() there is no need for the compiler to determine whether or not it should ignore the code if its being used or not.
mysql R5


Re: mysql errors - Kevinas100 - 10.03.2019

Sorry for double post, but i fixed it, i just used mysql_retrieve_row(); after mysql_store_result();