How can playerid be undefined?
#1

pawn Код:
CMD:healme(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -2249.1409,2065.4504,6.0776) || IsPlayerInRangeOfPoint(playerid, 7.0, -786.4995,424.1443,11.3629) || IsPlayerInRangeOfPoint(playerid, 7.0, 211.1811,386.8993,24.9100) || IsPlayerInRangeOfPoint(playerid, 7.0, 1530.4073,536.8085,7.4502) || IsPlayerInRangeOfPoint(playerid, 7.0, 2567.0186,476.8986,10.9767))
    {
        SendClientMessage(playerid, COLOR_WHITE, "Your position has been loaded.");
    }
    return 1;
}
I get five errors saying that playerid is not defined correctly, which makes no sense....

Am I doing something wrong, because the wiki says you do it this way

pawn Код:
if(!strcmp("/stadium",cmdtext))
{
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))
    {
        SendClientMessage(playerid,0xFFFFFFFF,"You are near the Stadium entrance!");
    }
    return 1;
}
Reply
#2

post errors
Reply
#3

I just said, all my errors says

Undefined symbol, playerid
Reply
#4

oh sorry, i meant to say

post REAL errors

did u include ZCMD?
Reply
#5

pawn Код:
if(!strcmp(cmdtext, "/stadium", true))
{
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))
    {
        SendClientMessage(playerid,0xFFFFFFFF,"You are near the Stadium entrance!");
    }
    return 1;
}
Reply
#6

i've just compiled this into a test fs, it compiled ok for me Both did actually
Reply
#7

Onfroi?

That is the example on the SAMP Wiki

The above one, is the one I am doing

I have included ZCMD
pawn Код:
C:\Users\KiNG3\Desktop\Resort Studios\FURIOUS FREEROAM\gamemodes\FD.pwn(335) : error 017: undefined symbol "playerid"
C:\Users\KiNG3\Desktop\Resort Studios\FURIOUS FREEROAM\gamemodes\FD.pwn(336) : error 017: undefined symbol "playerid"
C:\Users\KiNG3\Desktop\Resort Studios\FURIOUS FREEROAM\gamemodes\FD.pwn(337) : error 017: undefined symbol "playerid"
C:\Users\KiNG3\Desktop\Resort Studios\FURIOUS FREEROAM\gamemodes\FD.pwn(338) : error 017: undefined symbol "playerid"
C:\Users\KiNG3\Desktop\Resort Studios\FURIOUS FREEROAM\gamemodes\FD.pwn(339) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
Already told you the errors... but ok.


EDIT: Fixed it, thanks.
Reply
#8

Quote:
Originally Posted by ******
Посмотреть сообщение
Those error lines don't match the code you posted.
Yea I know, I was too stupid to realize the lines.....
Reply
#9

If you looked at the above posts, I said I fixed it.. It's alright

I put the Mapicon's under OnGameModeInit, and OnGameModeInit doesnt have playerid...

It's all fixed ******!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)