sscanf & mysql - argument type mismatch - 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: sscanf & mysql - argument type mismatch (
/showthread.php?tid=661612)
sscanf & mysql - argument type mismatch -
Fratzi - 09.12.2018
what's wrong with this code?
Код:
cache_get_field_content_float(0, "index_9", index_result); format(index_var, sizeof(index_var), index_result);
sscanf(index_var, "p<|>ffffff", PlayerInfo[playerid][Index_9][0], PlayerInfo[playerid][Index_9][1], PlayerInfo[playerid][Index_9][2], PlayerInfo[playerid][Index_9][3], PlayerInfo[playerid][Index_9][4], PlayerInfo[playerid][Index_9][5]);
I get this error
Код:
error 035: argument type mismatch (argument 3)
The line containing the error is:
Код:
cache_get_field_content_float(0, "index_9", index_result); format(index_var, sizeof(index_var), index_result);
Re: sscanf & mysql - argument type mismatch -
Kraeror - 09.12.2018
What type is your variable "index_result"(string, integer, float or something else)?
Re: sscanf & mysql - argument type mismatch -
Fratzi - 09.12.2018
Solved.
I changed
Код:
cache_get_field_content_float(0, "index_9", index_result);
with
Код:
cache_get_field_content(0, "index_9", index_result);
Quote:
Originally Posted by Kraeror
What type is your variable "index_result"(string, integer, float or something else)?
|
Thank you for your interest.