SA-MP Forums Archive
Compile error - 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: Compile error (/showthread.php?tid=354936)



Compile error - Subwoofer - 28.06.2012

Ok, when i make this:

pawn Код:
public OnRconCommand(cmd[])
{
    SendClientMessage(playerid, "Use /Rconhelp for commands"
    return 1;
}
then i get this error:

Код:
C:\Users\Windows7\Desktop\Asjad\SAMP\ZOMBIE APOCALYPSE RPG\gamemodes\test.pwn(367) : error 017: undefined symbol "playerid"
C:\Users\Windows7\Desktop\Asjad\SAMP\ZOMBIE APOCALYPSE RPG\gamemodes\test.pwn(367 -- 368) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Can anyone help me with it?


Re: Compile error - Vince - 28.06.2012

There is no playerid parameter, it's simple as that. As far as I know, OnRconCommand is only called for things typed into the console.


Re: Compile error - Subwoofer - 28.06.2012

Quote:
Originally Posted by Romel
Посмотреть сообщение
OnRconCommand is called when you type the command in the server console.
Epic fail.
it doesnt matter where i write it, when i even try to make any command and give it client message, then i get same error


Re: Compile error - sleepysnowflake - 28.06.2012

That's because it is supposed to be under the OnPlayerCommandText callback. Not under some random callback that don't even have the
playerid' parameter.


Re: Compile error - [A]ndrei - 29.06.2012

wont work lol you goto to make it a command...or something like that.


Re: Compile error - JaTochNietDan - 29.06.2012

Seriously people, if you don't know what you're talking about, then please don't post. You are not helping anyone by posting code that blatantly doesn't work and makes no sense. It is considered spamming.

I've had to go around deleting half of the thread because of spam and some of you may have received infractions.