gate help
#1

i found several tutorials and followed each one, and i when i compile it, i get 2 warning, i cant remember what the full warning is but its something about a loose agrument and it compiles but when i run the gamemode my server starts crashing and messes up my server

how can i fix this?


EDIT:
Код:
warning 202: number of arguments does not match definition
now i tried the gate maker too, i got 2 errors and like 5 warnings
Код:
#include <a_samp>

/* Generated by BlackFoX's Gate Mak3R */

new elevator_gate;
new elevator_state;
forward PlayerToPoint (Float:radi, playerid, Float:x, Float:y, Float:z);
#define FILTERSCRIPT

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" FS By BFXs Gate Mak3R");
	print("--------------------------------------\n");
elevator_state = 0;
elevator_gate = elevator = CreateObject(object_ID,2496.8589,2773.1340,10.8242,268.2291,0,0,0,0,0,0);
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print("");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerPrivmsg(playerid, recieverid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/fbiele", cmdtext, true, 10) == 0)
	{
   if(!PlayerToPoint(10, playerid,2496.8589,2773.1340,10.8242,268.2291)) { return 1; }
		if(elevator_state == 0)
		{
		elevator_state = 1;
		MoveObject(elevator_gate,2496.8589,2773.1340,18.5873,274.8091,7);
		}
		else if(elevator_state == 1)
		{
		elevator_state = 0;
		MoveObject(elevator_state,2496.8589,2773.1340,10.8242,268.2291,7);
		}
		return 1;
	}
	return 0;
}

public OnPlayerInfoChange(playerid)
{
	return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
	new Float:oldposx, Float:oldposy, Float:oldposz;
	new Float:tempposx, Float:tempposy, Float:tempposz;
	GetPlayerPos(playerid, oldposx, oldposy, oldposz);
	tempposx = (oldposx -x);
	tempposy = (oldposy -y);
	tempposz = (oldposz -z);
	//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
	if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
	{
		return 1;
	}
	return 0;
}
Reply
#2

Quote:
Originally Posted by killar456
i found several tutorials and followed each one, and i when i compile it, i get 2 warning, i cant remember what the full warning is but its something about a loose agrument and it compiles but when i run the gamemode my server starts crashing and messes up my server

how can i fix this?
this means you have 2 things that are not in the right place
Reply
#3

Show the code & warnings.
Reply
#4

i edited the post and got the warning plus one code i tried to use
Reply
#5

Line of warning.
Not sure but I think it's elevator_state = 0; in OnGameModeInit..
It's impossible, tough.
Reply
#6

i fixed the errors now i get
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP SERVER\filterscripts\fbigate.pwn(17) : warning 217: loose indentation
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP SERVER\filterscripts\fbigate.pwn(18) : warning 202: number of arguments does not match definition
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP SERVER\filterscripts\fbigate.pwn(18) : warning 202: number of arguments does not match definition
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP SERVER\filterscripts\fbigate.pwn(18) : warning 202: number of arguments does not match definition
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP SERVER\filterscripts\fbigate.pwn(18) : warning 202: number of arguments does not match definition
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP SERVER\filterscripts\fbigate.pwn(19) : warning 217: loose indentation
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP SERVER\filterscripts\fbigate.pwn(102) : warning 202: number of arguments does not match definition
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP SERVER\filterscripts\fbigate.pwn(103) : warning 217: loose indentation
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP SERVER\filterscripts\fbigate.pwn(106) : warning 202: number of arguments does not match definition
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP SERVER\filterscripts\fbigate.pwn(111) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


10 Warnings.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)