Commands.
#1

Hello fellas have some troubles with commands.

Here's the code: http://pastebin.com/gdLrdNTf

And the problem is that everything works fine with first command ( - "s" [text]) But if I type for example "/pr kick" or something I gettint the text: "Command usage: /pr s [text]" - first command, so basiclly first command works fine, bet if I type not a first command or even a single word it gives that usage is: /pr s [text], so where's the problem?
Reply
#2

I can't help since it's not in english.
Reply
#3

It's only error messages in other language. The point is the COMMAND - params - extra variable.
Reply
#4

What command you wanted to make.
Reply
#5

There's a command called: pr (CMDr( playerid, params[] )

And inside this command there are a a several commands which uses STRCMP. everything went ok if I check STRCMP with params evertyghin is okey, but if i need an extra variable for example REASON it won't work, so i figured out that i need an extra variable to check STRCMP (new check[ size ] but everything work WRONG like i said in first post...
Reply
#6

why does the command do i mean.
Reply
#7

Use sscanf.
Reply
#8

on one parameter is not worth the use in sscanf
Reply
#9

But you aren't using one parameter, you're using two if I understand you correctly.

new sscanf_string[2][64];

sscanf(params, "s[64]s[64]", sscanf_string[0], sscanf_string[1]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)