SA-MP Forums Archive
[HELP] Compiling problem - 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: [HELP] Compiling problem (/showthread.php?tid=142218)



[HELP] Compiling problem - djvolt - 17.04.2010

I've had a problem. When I compile my gamemode I recive this error:
Quote:

C:\Documents and Settings\Laur\Desktop\DM\gamemodes\deathmatch.pwn( 825) : error 012: invalid function call, not a valid address
C:\Documents and Settings\Laur\Desktop\DM\gamemodes\deathmatch.pwn( 825) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Laur\Desktop\DM\gamemodes\deathmatch.pwn( 825) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Laur\Desktop\DM\gamemodes\deathmatch.pwn( 825) : fatal error 107: too many error messages on one line

The script is:
Quote:

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_SUBMISSION)
{
if (IsPlayerInAnyVehicle(playerid))
{
new Float:health;
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vehicleid, health);
if (health < 995)
{
RepairVehicle(GetPlayerVehicleID(playerid));
}
}
}
if(newkeys == KEY_JUMP)
{
if(Planted[playerid] == 1)
{
GivePlayerWeapon(playerid, 40, 1);
ClearAnimations(playerid);
ApplyAnimation(playerid,"PED","bomber",4.0,0,0,0,0 ,1000);
SetTimerEx("Explode", 1200, 0, "i", playerid);
return 1;
}
}
if(newkeys & KEY_FIRE && IsPlayerInAnyVehicle(playerid))
{
if(!IsNosVehicle(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid,0xFF0000AA , "You can not add nitro to the vehicle");
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
}
return 1;
}

and the line 825 is
Quote:

RepairVehicle(GetPlayerVehicleID(playerid));




Re: [HELP] Compiling problem - FreddeN - 17.04.2010

-DELETED-

-The answer I gave was incorrect.


Re: [HELP] Compiling problem - djvolt - 17.04.2010

i want a script ... when I press key_submission my vehicle will be repaired...sry for my bad english I'm learning


Re: [HELP] Compiling problem - FUNExtreme - 17.04.2010

This will not fix your problem but why do you use
pawn Код:
RepairVehicle(GetPlayerVehicleID(playerid));
When you allready have the vehicleid
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
Just use
pawn Код:
RepairVehicle(vehicleid);



Re: [HELP] Compiling problem - aircombat - 17.04.2010

the function work fine with me , u must have older includes i think