SA-MP Forums Archive
A couple of 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: A couple of errors (/showthread.php?tid=135151)



A couple of errors - jameskmonger - 19.03.2010

Quote:

C:\Users\James\Desktop\SAMP\gamemodes\roleplay.pwn (436) : error 012: invalid function call, not a valid address
C:\Users\James\Desktop\SAMP\gamemodes\roleplay.pwn (436) : error 001: expected token: ";", but found ")"
C:\Users\James\Desktop\SAMP\gamemodes\roleplay.pwn (436) : error 029: invalid expression, assumed zero
C:\Users\James\Desktop\SAMP\gamemodes\roleplay.pwn (436) : fatal error 107: too many error messages on one line

And here's the code:
Код:
public OnVehicleDeath(vehicleid, killerid)
{
	if(GetCreatorID(vehicleid)!=0)
	{
		new create = GetCreatorID(vehicleid);
		DestroyVehicle(vehicleid);
		new CAR = CreateVehicle(VehicleSystem[create][model],VehicleSystem[create][x],VehicleSystem[create][y],VehicleSystem[create][z],VehicleSystem[create][a],VehicleSystem[create][Colour1],VehicleSystem[create][Colour2],600000);
		Tune(CAR);
	}
	return 1;
}
Код:
if(GetCreatorID(vehicleid)!=0)
^ That's line 436


Re: A couple of errors - [cA]Unforseen - 19.03.2010

try this one

Код:
public OnVehicleDeath(vehicleid, killerid)
{
	if(GetCreatorID(vehicleid) != 0)
	{
		new create = GetCreatorID(vehicleid);
		DestroyVehicle(vehicleid);
		new CAR = CreateVehicle(VehicleSystem[create][model],VehicleSystem[create][x],VehicleSystem[create][y],VehicleSystem[create][z],VehicleSystem[create][a],VehicleSystem[create][Colour1],VehicleSystem[create][Colour2],600000);
		Tune(CAR);
	}
	return 1;
}



Re: A couple of errors - [MWR]Blood - 19.03.2010

Try with this
if(GetCreatorID(vehicleid)==0)


Re: A couple of errors - jameskmonger - 19.03.2010

Unforseen, that doesn't work.

Quote:
Originally Posted by ikarus
Try with this
if(GetCreatorID(vehicleid)==0)
That's not what I want to do.


Re: A couple of errors - [cA]Unforseen - 19.03.2010

then give me the define's
cuz i cant fix it without them


Re: A couple of errors - jameskmonger - 19.03.2010

Which defines? You can have my GetVehicleID method if you want.


Re: A couple of errors - [cA]Unforseen - 19.03.2010

i mean the GetCreatorID stock or else...


Re: A couple of errors - jameskmonger - 19.03.2010

It doesn't matter. The error is in the code I gave you.