Some problems with my commands
#1

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

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

They are already made!
Reply
#4

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

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)