Repair Vehicle not working
#1

Why does this not work?

error 010: invalid function or declaration

Код:
		if(strcmp(cmd, "/fix", true))
		{
			if(IsPlayerInAnyVehicle(playerid))RepairVehicle(GetPlayerVehicleID(playerid));
			return 1;
		}
I get
error 010: invalid function or declaration
on the top line, the "if(IsPlayerInAnyVehicle" line and the "return 1;" line.
Reply
#2

Код:
if(!strcmp(cmdtext,"/repair",true)) {
if(IsPlayerInAnyVehicle(playerid))
{
new VehicleID, Float:X, Float:Y, Float:Z,Float:Ang;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Ang);
VehicleID = GetPlayerVehicleID(playerid);
SetVehiclePos(VehicleID, X, Y, Z);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
RepairVehicle(VehicleID);
SendClientMessage(playerid, COLOR_LBLUE,"Vehicle repaired!");
}
else
{
SendClientMessage(playerid,COLOR_RED,"Your Not in any Vehicle!");
}
return 1;
}
This is the code i use, and it works Awsome!

-Dakota
Reply
#3

C:\Documents and Settings\Cozza\Desktop\samp0.3aserver\filterscript s\MidoStream.pwn(553) : error 010: invalid function or declaration
C:\Documents and Settings\Cozza\Desktop\samp0.3aserver\filterscript s\MidoStream.pwn(555) : error 010: invalid function or declaration
C:\Documents and Settings\Cozza\Desktop\samp0.3aserver\filterscript s\MidoStream.pwn(559) : error 010: invalid function or declaration

i cut your script down due to errors but got this now...

Код:
		if(!strcmp(cmdtext,"/fix",true) == 0)
	 	{
		if(IsPlayerInAnyVehicle(playerid))
		{
		VehicleID = GetPlayerVehicleID(playerid);
		RepairVehicle(VehicleID);
		return 1;
		}
Reply
#4

if(!strcmp(cmdtext,"/fix",true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
VehicleID = GetPlayerVehicleID(playerid);
RepairVehicle(VehicleID);
}
else
{
SendClientMessage(playerid,COLOR_RED,"Your Not in any Vehicle!");
}
return 1;
}
Reply
#5

I still get those same errors... Sorry to be annoying
Reply
#6

Fixed those errors by moving it above one of my other commands.
But i get Undefined Symbol "VehicleID"
Reply
#7

I truly am an idiot.

Код:
new VehicleID;
Reply
#8

Quote:
Originally Posted by XxCozzaxX
I truly am an idiot.

Код:
new VehicleID;
I got the error of RepairVehicle :P
Reply
#9

If you get the error from RepairVehicle, you may be using an earlier version of the includes.
Reply
#10

Quote:
Originally Posted by mavtias
If you get the error from RepairVehicle, you may be using an earlier version of the includes.
How do I update it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)