SA-MP Forums Archive
Mysql 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: Mysql error (/showthread.php?tid=649607)



Mysql error - IndependentGaming - 11.02.2018

Hello, got a error while trying to put something from a gamemode with newer version of mysql into a script with mysql version R33

changed from:
PHP код:
cache_get_value_name(row,  "JailedInfo"szResult);
                    
sscanf(szResult"p<|>e<ddddd>"PlayerInfo[extraid][pJailedInfo]);
                    
cache_get_value_name(row,  "JailedWeapons"szResult);
                    
sscanf(szResult"p<|>e<dddddddddddd>"PlayerInfo[extraid][pJailedWeapons]); 
changed to:
PHP код:
cache_get_field_name(row,  "JailedInfo"szResult);
                    
sscanf(szResult"p<|>e<ddddd>"PlayerInfo[extraid][pJailedInfo]);
                    
cache_get_field_name(row,  "JailedWeapons"szResult);
                    
sscanf(szResult"p<|>e<dddddddddddd>"PlayerInfo[extraid][pJailedWeapons]); 
Error I got:

Код:
./includes/mysql.pwn(602) : error 035: argument type mismatch (argument 3)
./includes/mysql.pwn(604) : error 035: argument type mismatch (argument 3)
I did not exactly know where to change cache_get_value_name to what the function is for R33 mysql plugin anyone ?

I changed cache_get_value_name with cache_get_field_name


Re: Mysql error - Mugala - 11.02.2018

here is a full tutorial how to update MySQL plugin
https://sampforum.blast.hk/showthread.php?tid=616103

by the way, u have to use cache_get_field_name like this
cache_get_field_name(field_index, destination[], connectionHandle = 1, max_len=sizeof(destination));
you have a part missing.


Re: Mysql error - IndependentGaming - 11.02.2018

I miss nothing, like I said the gamemode where I got it from uses a newer version of mysql and I use R33 but I need to know the function for mysql R33 that replaces: cache_get_value_name