Undefined symbol "playerid"
#1

Hi when i try compiling my script it comes with this error:
Код:
C:\Users\x3990.003\Desktop\samp server\filterscripts\Untitled.pwn(32) : error 017: undefined symbol "playerid"
C:\Users\x3990.003\Desktop\samp server\filterscripts\Untitled.pwn(33) : error 017: undefined symbol "playerid"
C:\Users\x3990.003\Desktop\samp server\filterscripts\Untitled.pwn(39) : error 017: undefined symbol "playerid"
C:\Users\x3990.003\Desktop\samp server\filterscripts\Untitled.pwn(40) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
PLEASE HLEP MEEEWWWW!!!
Reply
#2

Show us the line! line 32 33 39 and 40 and the call back under which you have put those lines
Reply
#3

You have to show those lines (32, 33, 39 and 40).
Reply
#4

Quote:
Originally Posted by Jarnu
Посмотреть сообщение
Show us the line! line 32 33 39 and 40 and the call back under which you have put those lines
Here you go

Код:
public OnRconCommand(cmd[])
{
    if(!strcmp(cmd,"/god",true))
    {
   		SendClientMessageToAll(0xDEEE20FF, "An admin has enabled his GODMODE!");
    	SetPlayerHealth(playerid, 9999999999999999999999);
    	SetPlayerArmour(playerid, 9999999999999999999999.0);
        return 1;
	}
	if(!strcmp(cmd,"/ungod",true))
    {
   		SendClientMessageToAll(0xDEEE20FF, "An admin has disabled his GODMODE!");
    	SetPlayerHealth(playerid, 100);
    	SetPlayerArmour(playerid, 0.0);
    }
    return 0;
}
Dont laugh at me please, im a beginner
Reply
#5

this will not work because playerid is not there in the callback..
you ahd rather create this command using your normal command processor and then before the command check if player is admin or not using if(!IsPlayerAdmin(playerid))

example -
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/god", true))
    {
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "you are not an admin");
        SendClientMessageToAll(0xDEEE20FF, "An admin has enabled his GODMODE!");
        SetPlayerHealth(playerid, 9999999999999999999999);
        SetPlayerArmour(playerid, 9999999999999999999999.0);
        return 1;
       
    }
if(!strcmp(cmd,"/ungod",true))
    {
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "you are not an admin");  
    SendClientMessageToAll(0xDEEE20FF, "An admin has disabled his GODMODE!");
        SetPlayerHealth(playerid, 100);
        SetPlayerArmour(playerid, 0.0);
    }
    return 0;
   
}
Reply
#6

Reduce down the 9's to 9999999, There are too many, I think thats what the problem is
Reply
#7

Quote:
Originally Posted by [HK]Ryder[AN]
Посмотреть сообщение
this will not work because playerid is not there in the callback..
you ahd rather create this command using your normal command processor and then before the command check if player is admin or not using if(!IsPlayerAdmin(playerid))
i really dont get this.. whats the correct format to use when trying to create a new rcon command?
Reply
#8

You're wrong Raxi. don't post if you don't know what you're talking about.

Anyway. as ryder said already. there is no "playerid" parameter in this callback.
Reply
#9

Quote:
Originally Posted by Jarnu
Посмотреть сообщение
You're wrong Raxi. don't post if you don't know what you're talking about.

Anyway. as ryder said already. there is no "playerid" parameter in this callback.
could you show me the correct format?
Reply
#10

Quote:
Originally Posted by Jarnu
Посмотреть сообщение
You're wrong Raxi. don't post if you don't know what you're talking about.

Anyway. as ryder said already. there is no "playerid" parameter in this callback.
I was wrong in one sense, but once he goes ingame and types that command he will just die, he already mentioned the callback so there was no point for me to do it? haha
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)