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



help - Rix70 - 11.08.2016

why does this happen? when i try to complie my gamemode with this in C:\Users\Linus\Desktop\Freeroam & Roleplay v0.1 - Deal closer\Freeroam & Roleplay v0.1 - Deal closer\gamemodes\FNRv0.1.pwn(3392 : error 021: symbol already defined: "S@@_OnPlayerCommandText"
C:\Users\Linus\Desktop\Freeroam & Roleplay v0.1 - Deal closer\Freeroam & Roleplay v0.1 - Deal closer\gamemodes\FNRv0.1.pwn(33934) : error 030: compound statement not closed at the end of file (started at line 33929)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/kill", cmdtext, true, 5) == 0)
{
SetPlayerHealth(playerid, 0.0);
return 1;
}




a /kill command that kills yourself but i cant complie it


Re: help - Kaliber - 11.08.2016

Look in your script for OnPlayerCommandText or look how you do other cmds, seems like your script uses an cmd processor and the callback get hooked