SA-MP Forums Archive
Some problems with my commands - 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)
+--- Thread: Some problems with my commands (/showthread.php?tid=402899)



Some problems with my commands - Oscii - 28.12.2012

Hello.

I've got a problem with these two lines but I just can't figure it out, I'm trying to learn to script by testing scripts and adding stuff.

Lines:

pawn Код:
dcmd(login,5,cmdtext)
    dcmd(register,8,cmdtext)
The errors are just
Invalid function or declaration, error 10 or something.

Regards
Oscii


Re: Some problems with my commands - Feastahashi - 28.12.2012

Make the commands, since you defined it.

Код:
dcmd_login(playerid, params[]) { return 1; }
Код:
dcmd_register(playerid, params[] { return 1; }
Look, guys: https://sampforum.blast.hk/showthread.php?tid=402897


Re: Some problems with my commands - Oscii - 28.12.2012

They are already made!


Re: Some problems with my commands - Oscii - 28.12.2012

It tells me warning 203: symbol is never used: "dcmd_login" that it is never used??


Re: Some problems with my commands - Konstantinos - 28.12.2012

Make sure these are inside the OnPlayerCommandText callback
pawn Код:
dcmd(login,5,cmdtext)
dcmd(register,8,cmdtext)
that there's this on top of your script, under Include(s)
pawn Код:
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
and you can show us these two commands?


Re : Some problems with my commands - DaRk_RaiN - 28.12.2012

You forgot ; and make sure you put those under OnPlayerCommandText
pawn Код:
dcmd(login,5,cmdtext);
    dcmd(register,8,cmdtext);
OFF TOPIC:
Dwane we post the same thing at the same time, weird xD