SA-MP Forums Archive
Error sistem - 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)
+--- Thread: Error sistem (/showthread.php?tid=586983)



Error sistem - Jimmi - 26.08.2015

C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(24934) : error 035: argument type mismatch (argument 3)
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(24936) : error 033: array must be indexed (variable "SpikeInfo")

24934

if(IsPlayerInRangeOfPoint(playerid, 3.0, SpikeInfo[nX], SpikeInfo[nY], SpikeInfo[nZ]))

24936

if(SpikeInfo[sCreated] == 1)

All

Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    		{
        		for(new i = 0; i < sizeof(SpikeInfo); i++)
  	    		{
  	        		if(IsPlayerInRangeOfPoint(playerid, 3.0, SpikeInfo[nX], SpikeInfo[nY], SpikeInfo[nZ]))
            		{
  	            		if(SpikeInfo[sCreated] == 1)
  	            		{
  	                		new panels, doors, lights, tires;
  	                		new carid = GetPlayerVehicleID(playerid);
		            		GetVehicleDamageStatus(carid, panels, doors, lights, tires);
		            		tires = encode_tires(1, 1, 1, 1);
		            		UpdateVehicleDamageStatus(carid, panels, doors, lights, tires);
  	                		return 0;
  	            		}
  	        		}
  	    		}
  			}



Re: Error sistem - madma - 27.08.2015

It supposed to be

Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    		{
        		for(new i = 0; i < sizeof(SpikeInfo); i++)
  	    		{
  	        		if(IsPlayerInRangeOfPoint(playerid, 3.0, SpikeInfo[i][nX], SpikeInfo[i][nY], SpikeInfo[i][nZ]))
            		{
  	            		if(SpikeInfo[i][sCreated] == 1)
  	            		{
  	                		new panels, doors, lights, tires;
  	                		new carid = GetPlayerVehicleID(playerid);
		            		GetVehicleDamageStatus(carid, panels, doors, lights, tires);
		            		tires = encode_tires(1, 1, 1, 1);
		            		UpdateVehicleDamageStatus(carid, panels, doors, lights, tires);
  	                		return 0;
  	            		}
  	        		}
  	    		}
  			}