error 017: undefined symbol "Kick"
#1

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(playeridcmdtext[])
{
    if(
strcmp(cmdtext"/kickme"true) == 0)
    {
        
// Kick the player who executed this command.
 
        // First, send them a message.
        
SendClientMessage(playerid0xFF0000FF"You Kicked.");
 
        
// Actually kick them a second later on a timer.
        
SetTimerEx("DelayedKick"1000false"i"playerid);
        return 
1;
    }
    return 
0;
}
 
forward DelayedKick(playerid);
public 
DelayedKick(playerid)
{
    
Kick(playerid);
    return 
1;

pls help guys how to fix this
Reply
#2

Hm... Put this on THE FIRST LINE if you are not already did it!
PHP Code:
#include <a_samp> 
Reply
#3

Also the OnPlayerCommandText is a public, change it to:
PHP Code:
public OnPlayerCommandText(playeridcmdtext[]) 
Reply
#4

when its on public I got error
Reply
#5

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

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

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

it's a callback!
PHP Code:
public OnPlayerText(playeridtext[]) 
Reply
#9

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.
Reply
#10

@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 ((
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)