Maybe sscanf 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: Maybe sscanf error (
/showthread.php?tid=656763)
Maybe sscanf error -
SecretMax - 23.07.2018
Hey, I want to load the jail info for players, but I got an error and idk whats the problem
Code:
Код:
mysql_get_string(0, "JailInfo", str);
This is the bad line: sscanf(str, "p<|>s["#MAX_PLAYER_NAME"]s[64]", playerInfo[playerid][pJailBy], playerInfo[playerid][pJailReason]);
Error:
Код:
error 001: expected token: ";", but found "-string-"
warning 215: expression has no effect
warning 215: expression has no effect
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Re: Maybe sscanf error -
GTLS - 23.07.2018
Why dont you use format?
https://sampwiki.blast.hk/wiki/Format
or may be try this..
PHP код:
sscanf(str, "p<|>s[MAX_PLAYER_NAME]s[64]", playerInfo[playerid][pJailBy], playerInfo[playerid][pJailReason]);
Re: Maybe sscanf error -
SecretMax - 23.07.2018
all both work, thank you ^^