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=265039)
SSCANF -_- -
SILENT! - 29.06.2011
pawn Код:
CMD:faction(playerid, params[])
{
if(playerVariables[playerid][pStatus] == 1)
{
new
action[32],
string[256],
id,
pin;
if(sscanf(params, "s[32]", action)) {
SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/faction [action]");
SendClientMessage(playerid, COLOR_GREY, "ACTIONS: login");
}
if(strcmp(action, "login", true) == 0)
{
if(sscanf(params, "dd", id,pin)) {
return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/faction login [id group] [pin]");
}
If i write /faction, it shows me:
Код:
SYNTAX: /faction [action]
ACTIONS: login
SYNTAX: /faction login [id group] [pin]
If i write /faction login 1 434 it doesn't show me nothing.
The problem is here:
pawn Код:
if(sscanf(params, "dd", id,pin)) {
return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/faction login [id group] [pin]");
}
I tried a lot of ways..
Re: SSCANF -_- -
BaubaS - 29.06.2011
Try to debug!
After line if(sscanf(params, "dd", id,pin)) add
SendClientMessage(playerid, -1, "TEST");
If it will work, then there's no problem, you didnt added anything after sscanf check.
Re: SSCANF -_- -
SILENT! - 29.06.2011
I know that.. I put SendClientMessage(playerid,COLOR_GREY,"1."); before that, and text 2 after. And just 1. showed me..
Re: SSCANF -_- -
SILENT! - 29.06.2011
Resolved..