SA-MP Forums Archive
[HELP] Return Cmd - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Return Cmd (/showthread.php?tid=265172)



[HELP] Return Cmd - TeRmi[N]aTor - 29.06.2011

hello , i have this error :
Код HTML:
 warning 202: number of arguments does not match definition
in this public :
Код HTML:
public ShowLoginDialog(playerid)
{
        SendClientMessage(playerid,red,"You are resisted , please Login to your account ! ");
	return dcmd_CMD_LOGIN(playerid);
}
in this line :
Код HTML:
	return dcmd_CMD_LOGIN(playerid);
can any one fix it ?


Re: [HELP] Return Cmd - [HiC]TheKiller - 29.06.2011

You are missing the params argument. Add a variable so it adds a password to login. It should be
pawn Код:
dcmd_CMD_LOGIN(playerid, params[]);



Re: [HELP] Return Cmd - TeRmi[N]aTor - 29.06.2011

it gives me :
error 017: undefined symbol "params"


Re: [HELP] Return Cmd - iPLEOMAX - 29.06.2011

If your /login is like /login [password], You can't return the cmd from another function without formatting a string as the password for the cmd.
Correct me if I'm wrong.

It says undefined symbol "params" because nothing is assinged to params in the ShowLoginDialog callback.

If your cmd is just "/login", then try this: return dcmd_CMD_login(playerid, "");


Re: [HELP] Return Cmd - TeRmi[N]aTor - 30.06.2011

tnx works !