Maybe sscanf error
#1

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
Reply
#2

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]); 
Reply
#3

all both work, thank you ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)