SA-MP Forums Archive
Weird Errors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Weird Errors (/showthread.php?tid=125507)



Weird Errors - Torran - 04.02.2010

Код:
C:\Users\Torran\Desktop\Roleplay Server\Gamemodes\tCnR.pwn(361) : error 017: undefined symbol "id"
C:\Users\Torran\Desktop\Roleplay Server\Gamemodes\tCnR.pwn(362) : error 017: undefined symbol "id"
C:\Users\Torran\Desktop\Roleplay Server\Gamemodes\tCnR.pwn(368) : warning 202: number of arguments does not match definition
C:\Users\Torran\Desktop\Roleplay Server\Gamemodes\tCnR.pwn(368) : error 001: expected token: ")", but found ";"
C:\Users\Torran\Desktop\Roleplay Server\Gamemodes\tCnR.pwn(368) : error 036: empty statement
C:\Users\Torran\Desktop\Roleplay Server\Gamemodes\tCnR.pwn(370) : error 017: undefined symbol "id"
C:\Users\Torran\Desktop\Roleplay Server\Gamemodes\tCnR.pwn(371) : error 017: undefined symbol "id"
C:\Users\Torran\Desktop\Roleplay Server\Gamemodes\tCnR.pwn(374) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
Im not used to these time of commands, Like using else and stuff:

pawn Код:
dcmd_heal(playerid, params[])
{
    if (strlen(params))
    {
        id = strval(params);
        if (IsPlayerConnected(id))
        {
          if(GetPlayerTeam(playerid) == 2)
          {
            new Float:x, Float:y, Float:z;
                GetPlayerPos(playerid, x, y, z);
                if(IsPlayerInRangeOfPoint(playerid, x, y, z);
                {
                    SetPlayerHealth(id, 100.0);
                    SendClientMessage(id, 0x00FF00AA, "You have been healed");
                    SendClientMessage(playerid, 0x00FF00AA, "Player healed");
                }
                else
                {
                    SendClientMessage(playerid, 0xFF0000AA, "You're not near this player");
                }
            }
            else
            {
        SendClientMessage(playerid, 0xFF0000AA, "You need to be part of the Medical Team to use this command");
            }
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000AA, "Player not found");
        }
    }
    else
    {
        SendClientMessage(playerid, 0xFF0000AA, "Usage: /heal (PlayerID/PartOfName) ");
    }
    return 1;
}



Re: Weird Errors - smeti - 04.02.2010

pawn Код:
new id = strval(params);

if(IsPlayerInRangeOfPoint(playerid, 6, x, y, z))



Re: Weird Errors - Torran - 04.02.2010

Quote:
Originally Posted by Phento
pawn Код:
new id = strval(params);

if(IsPlayerInRangeOfPoint(playerid, 6, x, y, z))
Ahh did not see that xd, Thanks