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
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
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
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...