zcmd sscanf problem
#1

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

ooooooo zmajko,sta ima,dobio ban na BS a?
Reply
#3

What do you mean "sending you back message"?
Reply
#4

The solution is not to edit a godfather script.
Reply
#5

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?
Reply
#6

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

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

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

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");
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)