one weird error
#1

i got this filterscript and when i compile it i get one error
Код:
error 025: function heading differs from prototype
Код:
CMD:ltc6( playerid, params[ ] )
{
    new Float:x, Float:y, Float:z, Float:Angle, carid;

	VipCheck( playerid, 1 );

	if ( IsPlayerInAnyVehicle( playerid ) )
		return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" );

	#if defined VIPS_SEND_COMMAND
	SendVipsCommand( playerid, "/ltc6" );
	#endif
	GetPlayerPos( playerid, x, y, z );
	GetPlayerFacingAngle( playerid, Angle );
    carid = CreateVehicle( 558, x, y, z, Angle, 1, -1, -1 );
	PutPlayerInVehicle( playerid, carid, 0 );//-------------------------ERROR LINE??????<><><><><><><><>
	AddVehicleComponent( carid, 1088 ); 	AddVehicleComponent( carid, 1092 );     AddVehicleComponent( carid, 1073 );
 	AddVehicleComponent( carid, 1139 ); 	AddVehicleComponent( carid, 1010 );  	ChangeVehiclePaintjob( carid, 1 );
   	SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) );
  	LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) );
	return 1;
}
Reply
#2

Quote:
Originally Posted by kaos999
Посмотреть сообщение
i got this filterscript and when i compile it i get one error
Код:
error 025: function heading differs from prototype
Код:
CMD:ltc6( playerid, params[ ] )
{
    new Float:x, Float:y, Float:z, Float:Angle, carid;

	VipCheck( playerid, 1 );

	if ( IsPlayerInAnyVehicle( playerid ) )
		return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" );

	#if defined VIPS_SEND_COMMAND
	SendVipsCommand( playerid, "/ltc6" );
	#endif
	GetPlayerPos( playerid, x, y, z );
	GetPlayerFacingAngle( playerid, Angle );
    carid = CreateVehicle( 558, x, y, z, Angle, 1, -1, -1 );
	PutPlayerInVehicle( playerid, carid, 0 );//-------------------------ERROR LINE??????<><><><><><><><>
	AddVehicleComponent( carid, 1088 ); 	AddVehicleComponent( carid, 1092 );     AddVehicleComponent( carid, 1073 );
 	AddVehicleComponent( carid, 1139 ); 	AddVehicleComponent( carid, 1010 );  	ChangeVehiclePaintjob( carid, 1 );
   	SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) );
  	LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) );
	return 1;
}
What happens you remove that line? It compiles perfectly?
Reply
#3

removed it still gives same error?
Reply
#4

any more help
Reply
#5

this needs to be done before i 2daii please(uk time)
Reply
#6

please people
Reply
#7

Firstly, spamming the topic isn't going to help at all, read the forum rules.

Secondly, try to add this under the first open swigly bracket:

pawn Код:
#pragma unused params
It's just a guess... I'm not sure it will work or not but give it a go.
Reply
#8

um do you have "#include <zcmd>" ?
Reply
#9

change this:

Код:
CMD:ltc6( playerid, params[ ] )
to this:

Код:
CMD:ltc6(playerid, params[])
Reply
#10

Quote:
Originally Posted by NaS
Посмотреть сообщение
change this:

Код:
CMD:ltc6( playerid, params[ ] )
to this:

Код:
CMD:ltc6(playerid, params[])
Spaces have no effect in pawn... this would not cause the error. THe correct answer was posted above; he was missing
pawn Код:
#include <zcmd>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)