sscanf - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: sscanf (
/showthread.php?tid=271704)
sscanf -
sansko - 25.07.2011
hello everyone,
i use sscanf instead of format but this keeps giving me errors in the conslole
pawn Код:
{
new string[128];
sscanf(string, "s[128]ii", "ERROR: Your new password must be between %i and %i characters long!", gSettings[PASS_MIN], gSettings[PASS_MAX]);//error
return SendClientMessage(playerid, COLOR_ORANGE, string);
}
gPlayerInfo[playerid][PLAYER_PASS] = buf2;
new string[256];
sscanf(string, "s[256]s[30]s[30]", "You have successfully changed your password from \'%s\' to \'%s\'.", tmp, tmp2);//error
return SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else
return SendClientMessage(playerid, COLOR_ORANGE, "ERROR: Incorrect password.");
}
i hope anyone can help me,
the problem or the sscanf lines only are good enough
thanks in advance,
Sansko.
Re: sscanf -
iggy1 - 25.07.2011
Sscanf doesn't work like that. You will need to use format to put values into strings. Sscanf splits strings and turns them to values.
Re: sscanf -
sansko - 25.07.2011
oh ok, i thought you could put values in strings with it too
thanks