Undefined X
#1

Hello, i was scripting some simple commands and i got an error i hadn't gotten before and i can't seem to see what's wrong. the error is this
Код:
C:\Users\Brenda\Desktop\tmp_fm_TcR.pwn(45) : error 017: undefined symbol "X"
C:\Users\Brenda\Desktop\tmp_fm_TcR.pwn(49) : error 017: undefined symbol "X"
C:\Users\Brenda\Desktop\tmp_fm_TcR.pwn(60) : error 017: undefined symbol "X"
C:\Users\Brenda\Desktop\tmp_fm_TcR.pwn(64) : error 017: undefined symbol "X"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
The script is this
pawn Код:
CMD:s(playerid,params[])
{
        if(sscanf(params,"s[128",message)) return SCM(playerid,grey,"USAGE: /s [text]");
        GetPlayerName(playerid,Nam,sizeof(Nam));
        GetPlayerPos(playerid,X,Y,Z);
        format(str,sizeof(str),"%s Shouts: %s",Nam, message);
        for(new i=0; i<MAX_PLAYERS; i++)
        {
                if(IsPlayerInRangeOfPoint(i,20, X,Y,Z))
                {
                    SCM(i,red,str);
                }
        }
        return 1;
}
CMD:w(playerid,params[])
{
        if(sscanf(params,"s[128",message)) return SCM(playerid,grey,"USAGE: /w [text]");
        GetPlayerName(playerid,Nam,sizeof(Nam));
        GetPlayerPos(playerid,X,Y,Z);
        format(str,sizeof(str),"%s Whispers: %s",Nam, message);
        for(new i=0; i<MAX_PLAYERS; i++)
        {
                if(IsPlayerInRangeOfPoint(i, 5.0, X,Y,Z))
                {
                    SCM(i,0xFF925EFF,str);
                }
        }
        return 1;
}
Help would be much appreciated
Reply
#2

s[128] <-- your missing the ]


You need to define them

new Float:X, Float:Y, Float:Z;
Reply
#3

Oh! thanks bro i really appreciate it
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)