Getting some warnings
#1

Hello, Im getting some warnings and i dont know how to resolve it.

Код:
C:\Users\Administrator\Desktop\miss nieuw script TEST\Crystal Generation Gaming 0.3Z\gamemodes\CGRP.pwn(23114) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\miss nieuw script TEST\Crystal Generation Gaming 0.3Z\gamemodes\CGRP.pwn(23115) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\miss nieuw script TEST\Crystal Generation Gaming 0.3Z\gamemodes\CGRP.pwn(23116) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\miss nieuw script TEST\Crystal Generation Gaming 0.3Z\gamemodes\CGRP.pwn(23117) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\miss nieuw script TEST\Crystal Generation Gaming 0.3Z\gamemodes\CGRP.pwn(23118) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\miss nieuw script TEST\Crystal Generation Gaming 0.3Z\gamemodes\CGRP.pwn(23119) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\miss nieuw script TEST\Crystal Generation Gaming 0.3Z\gamemodes\CGRP.pwn(23120) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\miss nieuw script TEST\Crystal Generation Gaming 0.3Z\gamemodes\CGRP.pwn(23121) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\miss nieuw script TEST\Crystal Generation Gaming 0.3Z\gamemodes\CGRP.pwn(23122) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Desktop\miss nieuw script TEST\Crystal Generation Gaming 0.3Z\gamemodes\CGRP.pwn(23123) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


10 Warnings.
Im busy to make some new factons i defined the IsATowTruck also IsATowman Also new TOWVehicles [10] started by vehicle 0 to 9




Код:
stock IsATowTruck(carid)
{
	for(new v = 0; v < sizeof(TOWVehicles); v++) {
	    if(carid == TOWVehicles[v]) return 1;
	}
	return 0;
}
Also if i spawn with /veh a tow truck i can use it as Faction vehicle
Reply
#2

Post the code from the lines gave the warnings too. If they're custom functions that give the warnings, you'll need to post atleast the line with their parameters.
Reply
#3

Код:
	// San Andreas Towing Service
	TOWVehicles[0] = AddStaticVehicleEx(525,2340.5298,1259.4850,11.4041,90.0000,-1,-1,100, VEHICLE_RESPAWN); // Tow Truck
	TOWVehicles[1] = AddStaticVehicleEx(525,2340.5298,1241.6157,11.4041,90.0000,-1,-1,100, VEHICLE_RESPAWN); // Tow Truck
	TOWVehicles[2] = AddStaticVehicleEx(525,2340.5298,1246.2351,11.4041,90.0000,-1,-1,100, VEHICLE_RESPAWN); // Tow Truck
	TOWVehicles[3] = AddStaticVehicleEx(525,2340.5298,1250.9609,11.4041,90.0000,-1,-1,100, VEHICLE_RESPAWN); // Tow Truck
	TOWVehicles[4] = AddStaticVehicleEx(525,2350.3547,1259.4850,11.4041,270.0000,-1,-1,100, VEHICLE_RESPAWN); // Tow Truck
	TOWVehicles[5] = AddStaticVehicleEx(525,2340.5298,1255.2939,11.4041,90.0000,-1,-1,100, VEHICLE_RESPAWN); // Tow Truck
	TOWVehicles[6] = AddStaticVehicleEx(525,2350.3547,1255.2939,11.4041,270.0000,-1,-1,100, VEHICLE_RESPAWN); // Tow Truck
	TOWVehicles[7] = AddStaticVehicleEx(525,2350.3547,1250.9609,11.4041,270.0000,-1,-1,100, VEHICLE_RESPAWN); // Tow Truck
	TOWVehicles[8] = AddStaticVehicleEx(525,2350.3547,1246.2351,11.4041,270.0000,-1,-1,100, VEHICLE_RESPAWN); // Tow Truck
	TOWVehicles[9] = AddStaticVehicleEx(525,2350.3547,1241.6157,11.4041,270.0000,-1,-1,100, VEHICLE_RESPAWN); // Tow Truck

	for(new x;x<sizeof(TOWVehicles);x++)
	{
	    format(string, sizeof(string), "Towman %d", TOWVehicles[x]);
	    SetVehicleNumberPlate(TOWVehicles[x], string);
	}
Reply
#4

You got 1 extra argument. Both values of -1 are color1 and color2. The VEHICLE_RESPAWN is the respawn_delay so the 100 (between those two) is not needed. Remove it and it will be fixed.
Reply
#5

new TOWVehicles[10];
Reply
#6

Its working 0 warnings but now another problem
the vehicles are not faction restricted.
Reply
#7

YEPPY!! Respawn Time!!
Reply
#8

In OnPlayerStateChange callback, you can check if the player tried to enter the vehicle as driver (or as passenger - it's up to you) so get the vehicleid (with GetPlayerVehicleID function) and loop through the TOW vehicles like the code in your first post. Compare if the vehicleid is equal with one of those vehicles and the player's faction is not the one you want and remove them (with RemovePlayerFromVehicle function).
Reply
#9

The warnings are been fixed the other problem is
The tow trucks aren't faction restricted.
Reply
#10

I have this

Код:
stock IsATowTruck(carid)
{
	for(new v = 0; v < sizeof(TOWVehicles); v++) {
	    if(carid == TOWVehicles[v]) return 1;
	}
	return 0;
}
And

Код:
IsATowman(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		new leader = PlayerInfo[playerid][pLeader];
		new member = PlayerInfo[playerid][pMember];
		if(member==1 || member==2 || member== 3 || member==5 || member==3 || member==6 || member==7 || member==11 || member==13 || member==16 || member==17 || member==18)
		{
			return 1;
		}
		else if(leader==1 || leader==2 || leader == 3 || leader==5 || leader==3 || leader==6 || leader==7 || leader==11 || leader==13 || leader==16 || leader==17 || leader==18)
		{
			return 1;
		}
		else if((member==12 || leader==12) && PlayerInfo[playerid][pDivision] == 2) return 1;
 	}
	return 0;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)