SA-MP Forums Archive
Public functions not implemented? - 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)
+--- Thread: Public functions not implemented? (/showthread.php?tid=289374)



Public functions not implemented? - Chenjiang - 11.10.2011

Quote:

C:\Users\Dominic\Desktop\Music!\GTAM\gamemodes\gta-mods.pwn(3808) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Users\Dominic\Desktop\Music!\GTAM\gamemodes\gta-mods.pwn(3837) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Users\Dominic\Desktop\Music!\GTAM\gamemodes\gta-mods.pwn(4183) : error 004: function "SafeSetPlayerInterior" is not implemented
C:\Users\Dominic\Desktop\Music!\GTAM\gamemodes\gta-mods.pwn(4225) : error 017: undefined symbol "GetVehicleName"
C:\Users\Dominic\Desktop\Music!\GTAM\gamemodes\gta-mods.pwn(4225) : warning 202: number of arguments does not match definition
C:\Users\Dominic\Desktop\Music!\GTAM\gamemodes\gta-mods.pwn(4569) : error 004: function "SafeSetPlayerPos" is not implemented
C:\Users\Dominic\Desktop\Music!\GTAM\gamemodes\gta-mods.pwn(4574) : error 004: function "SafeSetPlayerPos" is not implemented
C:\Users\Dominic\Desktop\Music!\GTAM\gamemodes\gta-mods.pwn(4579) : error 004: function "SafeSetPlayerPos" is not implemented
C:\Users\Dominic\Desktop\Music!\GTAM\gamemodes\gta-mods.pwn(4584) : error 004: function "SafeSetPlayerPos" is not implemented
C:\Users\Dominic\Desktop\Music!\GTAM\gamemodes\gta-mods.pwn(7065) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Users\Dominic\Desktop\Music!\GTAM\gamemodes\gta-mods.pwn(7105) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Users\Dominic\Desktop\Music!\GTAM\gamemodes\gta-mods.pwn(7129) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\Dominic\Desktop\Music!\GTAM\gamemodes\gta-mods.pwn(7176) : error 004: function "SaveGuns" is not implemented
C:\Users\Dominic\Desktop\Music!\GTAM\gamemodes\gta-mods.pwn(7180) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Users\Dominic\Desktop\Music!\GTAM\gamemodes\gta-mods.pwn(7184) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Users\Dominic\Desktop\Music!\GTAM\gamemodes\gta-mods.pwn(7188) : error 004: function "UpdatePlayerPosition" is not implemented

appears when i try to compile my gamemode. However, all these Functions are implemented and have a forward-description (example: SafeGivePlayerMoney)
it is defined:

forward SafeGivePlayerMoney(plyid, amounttogive);

and has a public function.
pawn Код:
public SafeGivePlayerMoney(plyid, amounttogive)
{
    ScriptMoneyUpdated[plyid] = 1;
    new RemoveMoney = ScriptMoney[plyid] + amounttogive;
    new AddMoney = ScriptMoney[plyid] + amounttogive;
    new string[20];
    format(string, sizeof(string),"$%d",amounttogive);
    if (amounttogive < 0)
    {
        if(ReceivedMoney[plyid] == 0)
        {
            if(!IsAtTransfender(plyid) && !IsAtPaySpray(plyid))
            {
                TextDrawHideForPlayer(plyid, Textdraw52[plyid]);
                ReceivedMoney[plyid] = 1;
                TextDrawColor(Textdraw52[plyid], 0xFF0000FF);
                TextDrawSetString(Textdraw52[plyid], string);
                TextDrawShowForPlayer(plyid, Textdraw52[plyid]);
                MoneyTimer[plyid] = SetTimerEx("RedMoney",125,true,"i",plyid);
            }
        }
        else
        {
            if(!IsAtTransfender(plyid) && !IsAtPaySpray(plyid))
            {
                KillTimer(MoneyTimer[plyid]);
                ReceivedMoney[plyid] = 1;
                TextDrawHideForPlayer(plyid, Textdraw52[plyid]);
                TextDrawColor(Textdraw52[plyid], 0xFF0000FF);
                TextDrawSetString(Textdraw52[plyid], string);
                TextDrawShowForPlayer(plyid, Textdraw52[plyid]);
                MoneyTimer[plyid] = SetTimerEx("RedMoney",125,true,"i",plyid);
            }
        }
        GivePlayerMoney(plyid, amounttogive);
        ScriptMoney[plyid] = RemoveMoney;
    }
    else
    {
        if(ReceivedMoney[plyid] == 0)
        {
            if(!IsAtTransfender(plyid) && !IsAtPaySpray(plyid))
            {
                TextDrawHideForPlayer(plyid, Textdraw52[plyid]);
                ReceivedMoney[plyid] = 1;
                TextDrawColor(Textdraw52[plyid], 0x00FF00FF);
                TextDrawSetString(Textdraw52[plyid], string);
                TextDrawShowForPlayer(plyid, Textdraw52[plyid]);
                MoneyTimer[plyid] = SetTimerEx("GreenMoney",125,true,"i",plyid);
            }
        }
        else
        {
            if(!IsAtTransfender(plyid) && !IsAtPaySpray(plyid))
            {
                KillTimer(MoneyTimer[plyid]);
                ReceivedMoney[plyid] = 1;
                TextDrawHideForPlayer(plyid, Textdraw52[plyid]);
                TextDrawColor(Textdraw52[plyid], 0x00FF00FF);
                TextDrawSetString(Textdraw52[plyid], string);
                TextDrawShowForPlayer(plyid, Textdraw52[plyid]);
                MoneyTimer[plyid] = SetTimerEx("GreenMoney",125,true,"i",plyid);
            }
        }
        ScriptMoney[plyid] = AddMoney;
        GivePlayerMoney(plyid, amounttogive);
    }
    return 1;
}

Other than this, most of the public functions work perfectly. only those bits dont.


Re: Public functions not implemented? - aRoach - 11.10.2011

You mised a '}' before this functions....


AW: Public functions not implemented? - Chenjiang - 11.10.2011

Dont think so.
Public functions After those ones, e.g. SafeRespawnVehicle work perfectly, and same for Functions above those ones. (e.g. UpdateVehiclePosition)