SA-MP Forums Archive
Error CMD - 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: Error CMD (/showthread.php?tid=238445)



Error CMD - SamyRomafia - 11.03.2011

pawn Код:
/*ExitRace*/
CMD:exitrace(playerid, params[])
{
    if(Joined[playerid] == true)
    {
        JoinCount--;
        Joined[playerid] = false;
        DestroyVehicle(CreatedRaceVeh[playerid]);
        DisablePlayerRaceCheckpoint(playerid);
        TextDrawHideForPlayer(playerid, RaceInfo[playerid]);
        CPProgess[playerid] = 0;
        KillTimer(InfoTimer[playerid]);
        TogglePlayerControllable(playerid, true);
        SetCameraBehindPlayer(playerid);
        #if defined RACE_IN_OTHER_WORLD
        SetPlayerVirtualWorld(playerid, 0);
        #endif
    } else return SendClientMessage(playerid, RED, "<!> You are not in a race!");
    return 1;
}

/*ExitRace*/
CMD:er(playerid, params[])
{
    return CMD:exitrace(playerid,params);//6677
}
Errors:

Код:
C:\Users\proprietario\Desktop\Drifting Stunting Racing\gamemodes\DSRClan.pwn(6677) : error 029: invalid expression, assumed zero
C:\Users\proprietario\Desktop\Drifting Stunting Racing\gamemodes\DSRClan.pwn(6677) : error 029: invalid expression, assumed zero
C:\Users\proprietario\Desktop\Drifting Stunting Racing\gamemodes\DSRClan.pwn(6678) : warning 209: function "cmd_er" should return a value
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: Error CMD - Kwarde - 11.03.2011

pawn Код:
CMD:er(playerid, params[])
{
    return CMD:exitrace(playerid,params);//6677
}
should be
pawn Код:
CMD:er(playerid, params[])
    return cmd_exitrace(playerid, params);
I guess


Re: Error CMD - SamyRomafia - 11.03.2011

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
pawn Код:
CMD:er(playerid, params[])
{
    return CMD:exitrace(playerid,params);//6677
}
should be
pawn Код:
CMD:er(playerid, params[])
    return cmd_exitrace(playerid, params);
I guess
Ok thanks now work