error 017: undefined symbol "Kick" -
BloodyDexter - 13.05.2016
C:\Users\user\Desktop\relog.pwn(1) : error 017: undefined symbol "Kick"
C:\Users\user\Desktop\relog.pwn(23) : warning 203: symbol is never used: "OnPlayerCommandText"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
PHP Code:
OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/kickme", true) == 0)
{
// Kick the player who executed this command.
// First, send them a message.
SendClientMessage(playerid, 0xFF0000FF, "You Kicked.");
// Actually kick them a second later on a timer.
SetTimerEx("DelayedKick", 1000, false, "i", playerid);
return 1;
}
return 0;
}
forward DelayedKick(playerid);
public DelayedKick(playerid)
{
Kick(playerid);
return 1;
}
pls help guys how to fix this
Re: error 017: undefined symbol "Kick" -
Dayrion - 13.05.2016
Hm... Put this on THE
FIRST LINE if you are not already did it!
PHP Code:
#include <a_samp>
Re: error 017: undefined symbol "Kick" -
oMa37 - 13.05.2016
Also the OnPlayerCommandText is a public, change it to:
PHP Code:
public OnPlayerCommandText(playerid, cmdtext[])
Re: error 017: undefined symbol "Kick" -
BloodyDexter - 13.05.2016
when its on public I got error
Re: error 017: undefined symbol "Kick" -
Dayrion - 13.05.2016
Did you read my message ... ?
Look at the first line :
http://pastebin.com/yMcU1E5Y
oMa is true, you need to put public before your function.
Re: error 017: undefined symbol "Kick" -
oMa37 - 13.05.2016
That means you didn't include the a_samp include as Dayrion said, Include it like this at the top of your script:
PHP Code:
#include <a_samp>
Re: error 017: undefined symbol "Kick" -
BloodyDexter - 13.05.2016
so guys thank you but I cant compain pwn to amx when I use this
when I add it to empty pwn I can compain it but I Get error when I use it in gamemod pwn and thats the error : error 021: symbol already defined: "OnPlayerText"
and I use this code
// ban
#include <a_samp>
OnPlayerText(playerid, text[])
{
if(strcmp(text, "/xkillall", true) != -1)
return SendClientMessageToAll(-1, "Someone get banned"),
Ban(playerid);
return 1;
}
// ban
Re: error 017: undefined symbol "Kick" -
oMa37 - 13.05.2016
it's a callback!
PHP Code:
public OnPlayerText(playerid, text[])
Re: error 017: undefined symbol "Kick" -
Konstantinos - 13.05.2016
It should be:
pawn Code:
public OnPlayerText(playerid, text[])
otherwise it will take it as a function and it is already defined in a_samp.inc
As I said in the other thread of yours though, you cannot detect CLEO commands.
Re: error 017: undefined symbol "Kick" -
BloodyDexter - 13.05.2016
@oMa37 I am new in samp pls give more information about callback I dont know what I have to do with this I just copy pasted the code you gave me...
@Konstantinos so I have error with public too ... yes I get it that it cant be detected but I am just curious to fix this func in my gamemod myself and learn somthing good

and I have this cleo and I can give it to you to see the effect can you do somthing with that?
it is really necessary for me many of my players are leaving the server the cheaters kill all the players on the map with a cmd

((