SA-MP Forums Archive
zcmd sscanf problem - 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: zcmd sscanf problem (/showthread.php?tid=266797)



zcmd sscanf problem - Dragony92 - 06.07.2011

http://pastebin.com/cbtiNkj3
/suspect
I dont know what's wrong, but sscanf is sending me back message...


Re: zcmd sscanf problem - Rob_Zero - 06.07.2011

ooooooo zmajko,sta ima,dobio ban na BS a?


Re: zcmd sscanf problem - *IsBack - 06.07.2011

What do you mean "sending you back message"?


Re: zcmd sscanf problem - Jochemd - 06.07.2011

The solution is not to edit a godfather script.


Re: zcmd sscanf problem - Dragony92 - 06.07.2011

Quote:
Originally Posted by *IsBack
Посмотреть сообщение
What do you mean "sending you back message"?
if(sscanf(params, "us[64]", giveplayerid,result)) return SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /su [playerID/DeoImena][zlocin]");
Like i did not typed command correctly Koriscenje: /su [playerID/DeoImena][zlocin]
Usage: /su [playerID/partOfName][crime]

Quote:
Originally Posted by Jochemd
Посмотреть сообщение
The solution is not to edit a godfather script.
It's not gf


Quote:
Originally Posted by Rob_Zero
Посмотреть сообщение
ooooooo zmajko,sta ima,dobio ban na BS a?
Evo me, ti si?


Re: zcmd sscanf problem - Jochemd - 06.07.2011

Hmm okay, let's try it another way: check if the params are OK, instead of checking they're not ok

pawn Код:
if(!sscanf,blahblah) {
This means you need to execute the code if it's correct, and return under the code if not correct

pawn Код:
}
else return SendClientMessage(playerid,COLOR,"Error message here")
Talk english here, please.


Re: zcmd sscanf problem - Rob_Zero - 06.07.2011

NooBot = NubBot jer se dva o (oo) cita u xD


Re: zcmd sscanf problem - Dragony92 - 06.07.2011

Quote:
Originally Posted by Jochemd
Посмотреть сообщение
Hmm okay, let's try it another way: check if the params are OK, instead of checking they're not ok

pawn Код:
if(!sscanf,blahblah) {
This means you need to execute the code if it's correct, and return under the code if not correct

pawn Код:
}
else return SendClientMessage(playerid,COLOR,"Error message here")
Talk english here, please.
It's the same, i done like you sad http://pastebin.com/ai287E3y


Re: zcmd sscanf problem - Markx - 06.07.2011

Quote:
Originally Posted by Jochemd
Посмотреть сообщение
Hmm okay, let's try it another way: check if the params are OK, instead of checking they're not ok

pawn Код:
if(!sscanf,blahblah) {
This means you need to execute the code if it's correct, and return under the code if not correct

pawn Код:
}
else return SendClientMessage(playerid,COLOR,"Error message here")
Talk english here, please.
That would return the error message on sucess. '!' = if not something so else would return the sucess, he used it good. Correct me if im wrong.

You can also:

pawn Код:
if(sscanf(params, "u", example)) return SendClientMessage(playerid, color, "Error");



Re: zcmd sscanf problem - Dragony92 - 06.07.2011

I did that in my first version of command, you can see it in first post, other simple commands work fine, but this with string makes me problem...same is with kick id reason...