VERY VERY VERY weird problem
#1

Alright so I've been making this little COD game mode but then I encountered a very strange problem I never have encountered before. it is giving me an error of a symbol already being defined but not ANYWHERE IN my game mode can I find it.

Error:
Код:
error 021: symbol already defined: "AIRHID_OnPlayerDisconnect"
I have no fucking idea wtf this means since I tried searching in my Game mode and I found NOTHING.

Is this a glitch? a bug? you decide.

Any help would be appreciated (;
Reply
#2

It is probably somewhere in an include then. Maybe some hooked callback that gets hooked with defines.
Reply
#3

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
It is probably somewhere in an include then. Maybe some hooked callback that gets hooked with defines.
I checked my most recent includes and there is NO sign, believe me when I say NO SIGN, of that define anywhere.
Reply
#4

What plugins are you running? With includes of course..
Reply
#5

Quote:
Originally Posted by Steven82
Посмотреть сообщение
What plugins are you running? With includes of course..
these are all my includes I have in my Game Mode:

Код:
#include <a_samp>
#include <float>
#include <core>
#include <Dudb>
#include <Dini>
#include <MidoStream>
#include <a_npc>
#include <FoxMoney_v2>
#include <YSI\y_bit>
#include <foreach>
#include <VehicleHealthBar>
#include <bodyparts>
#include <antihax>
#include <airstrike>
#include <mapandreas>
#include <rc>
#include <zcmd>
#include <sscanf2>
#include <miniguns>
#include <j_fader_v2>
I can't really say which ones use plugins for now since I'm in a hurry.

Be back in a bit, waiting for a reply (:
Reply
#6

Check this include #include <airstrike>

It must be an include yes or yes.
Reply
#7

Quote:
Originally Posted by Code8976Man
Посмотреть сообщение
Check this include #include <airstrike>

It must be an include yes or yes.
fucking thanks...but still got a question. What to delete? because if I do then the include won't work?


Airstrike.inc:
Код:
#include <mapandreas>


	//Settings
#if !defined BOMBS
	#define BOMBS 4                     // Amount of bombs in a single load - caution: Can bug up!
#endif

#if !defined LOADS
	#define LOADS 3                     // Amount of loads dropped
#endif

#if !defined AREA
	#define AREA 45                     // Area of Effect in SA-MP units. Square.
#endif

#if !defined MINIMUM_INTERVAL
	#define MINIMUM_INTERVAL 3250       // Minimum interval between loads
#endif

#if !defined EXTRA_MAX_INTERVAL
	#define EXTRA_MAX_INTERVAL 550      // 'Additional' interval between dropped bombs
#endif

#if !defined EXPLOSION_TYPE
	#define EXPLOSION_TYPE 7           // Type of explosion, check the wiki for lists. Standard 7 = HUGE
#endif

#if !defined EXPLOSION_RADIUS
	#define EXPLOSION_RADIUS 8.5        // Explosion radius. I don't really have any effect of it but maybe you do.
#endif

	//End

forward Airstrike_Init();
public Airstrike_Init()
{
	MapAndreas_Init(2);
	print("IT R LOAD!");
}

public OnPlayerDisconnect(playerid, reason)
{
	if(GetPVarInt(playerid, "Airstrike") != 0) KillTimer(GetPVarInt(playerid, "Airstrike") - 1);
	return 1;
}

#if defined _ALS_OnPlayerDisconnect
	#undef OnPlayerDisconnect
#else
	#define _ALS_OnPlayerDisconnect
#endif
#define OnPlayerDisconnect AIRHID_OnPlayerDisconnect
forward AIRHID_OnPlayerDisconnect(playerid, reason);

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(GetPVarInt(playerid, "Airstrike") != 0 && newkeys & KEY_FIRE && !(oldkeys & KEY_FIRE))
	{
		new Float:Pos[3];
		Pos[0] = GetPVarFloat(playerid, "CamX");
		Pos[1] = GetPVarFloat(playerid, "CamY");
		Pos[2] = GetPVarFloat(playerid, "CamZ");
		SetTimerEx("SetUpAirstrike", 750, 0, "dffd", playerid, Pos[0], Pos[1], LOADS);
		GameTextForPlayer(playerid, "Airstrike inbound!", 1250, 3);
		KillTimer(GetPVarInt(playerid, "Airstrike") - 1);
		DeletePVar(playerid, "Airstrike");
		DeletePVar(playerid, "CamX");
		DeletePVar(playerid, "CamY");
		DeletePVar(playerid, "CamZ");
	}
	return 1;
}

#if defined _ALS_OnPlayerKeyStateChange
	#undef OnPlayerKeyStateChange
#else
	#define _ALS_OnPlayerKeyStateChange
#endif
#define OnPlayerKeyStateChange AIRHID_OnPlayerKeyStateChange
forward AIRHID_OnPlayerKeyStateChange(playerid, newkeys, oldkeys);

forward OnPlayerAirMapUpdate(playerid);
public OnPlayerAirMapUpdate(playerid)
{
	new Keys[3];
	GetPlayerKeys(playerid, Keys[0], Keys[1], Keys[2]);
	
	new Float:Pos[3];
	Pos[0] = GetPVarFloat(playerid, "CamX");
	Pos[1] = GetPVarFloat(playerid, "CamY");
	Pos[2] = GetPVarFloat(playerid, "CamZ");
	Pos[0] += ((Keys[2] > 0) ? ((Keys[0] & KEY_SPRINT) ? (3.6) : (1.8)) : (Keys[2] < 0) ? ((Keys[0] & KEY_SPRINT) ? (-3.6) : (-1.8)) : (0.0));
	Pos[1] += ((Keys[1] < 0) ? ((Keys[0] & KEY_SPRINT) ? (3.6) : (1.8)) : (Keys[1] > 0) ? ((Keys[0] & KEY_SPRINT) ? (-3.6) : (-1.8)) : (0.0));
	SetPlayerCameraPos(playerid, Pos[0], Pos[1], Pos[2]);
	SetPlayerCameraLookAt(playerid, Pos[0], Pos[1] + 0.01, Pos[2] - 1);
	SetPVarFloat(playerid, "CamX", Pos[0]);
	SetPVarFloat(playerid, "CamY", Pos[1]);
	SetPVarFloat(playerid, "CamZ", Pos[2]);
	return 1;
}

stock SetUpPlayerForAirstrike(playerid)
{
	new Float:Pos[3];
	GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
	MapAndreas_FindZ_For2DCoord(Pos[0], Pos[1], Pos[2]);
	Pos[2] += 85;
	SetPlayerCameraPos(playerid, Pos[0], Pos[1], Pos[2] + 85);
	SetPlayerCameraLookAt(playerid, Pos[0], Pos[1], Pos[2] - 1);
	TogglePlayerControllable(playerid, 0);
	SetPVarFloat(playerid, "CamX", Pos[0]);
	SetPVarFloat(playerid, "CamY", Pos[1]);
	SetPVarFloat(playerid, "CamZ", Pos[2]);
	SetPVarInt(playerid, "Airstrike", SetTimerEx("OnPlayerAirMapUpdate", 100, 1, "i", playerid) + 1);
	return 1;
}

forward SetUpAirstrike(playerid, Float:x, Float:y, load);
public SetUpAirstrike(playerid, Float:x, Float:y, load)
{
	if(!load) return;
	if(load == LOADS)
	{
		SetCameraBehindPlayer(playerid);
		TogglePlayerControllable(playerid, 1);
	}
	for(new b; b < BOMBS; b++)
	{
	    SetTimerEx("Bomb", MINIMUM_INTERVAL + random(EXTRA_MAX_INTERVAL), 0, "ff", x, y);
	}
	load--;
	SetTimerEx("SetUpAirstrike", MINIMUM_INTERVAL, 0, "dffd", playerid, x, y, load);
}

forward Bomb(Float:x, Float:y);
public Bomb(Float:x, Float:y)
{
	new Float:z;
	x += random(AREA) - floatdiv(AREA, 2);
	y += random(AREA) - floatdiv(AREA, 2);
	MapAndreas_FindZ_For2DCoord(x, y, z);
	CreateExplosion(x, y, z, EXPLOSION_TYPE, EXPLOSION_RADIUS);
}

/*
native SetUpPlayerForAirstrike(playerid);
native Airstrike_Init();
*/
Reply
#8

airstrike.inc already includes mapandreas.inc


Just delete #include <mapandreas> from your include list
Reply
#9

that really doesnt matter pawn has double inclusion cheking, it wont include it for the second time....
Reply
#10

Quote:
Originally Posted by legodude
Посмотреть сообщение
that really doesnt matter pawn has double inclusion cheking, it wont include it for the second time....
Not really, every include must have a defined therm with which to check if it was included or not.

I opened regex.inc

And found

pawn Код:
#if defined _regex_included
    #endinput
#endif
#define _regex_included
Which means, once include, the next inclusion will end the input before continuing on giving errors about "x already defined"

so even this
pawn Код:
#include <    regex     >//Included
#include <    regex     >//ends input
#include <    regex     >//--||--
#include <    regex     >//--||--
#include <    regex     >//--||--
Reply
#11

okay when I finished all of that I get the biggest and best error ever (:

Код:
Script[gamemodes/CODSW11.amx]: Run time error 19: "File or function is not found"
Server_Log.txt
Код:
SA-MP Dedicated Server
----------------------
v0.3c, ©2005-2010 SA-MP Team

[16:21:34] 
[16:21:34] Server Plugins
[16:21:34] --------------
[16:21:34]  Loading plugin: Whirlpool.dll
[16:21:34]  
[16:21:34]  ==================
[16:21:34]  
[16:21:34]   Whirlpool loaded
[16:21:34]  
[16:21:34]  ==================
[16:21:34]  
[16:21:34]   Loaded.
[16:21:34]  Loading plugin: audio.dll
[16:21:35] 

*** Audio Plugin v0.4 by Incognito loaded ***


[16:21:35]   Loaded.
[16:21:35]  Loading plugin: MapAndreas.dll
[16:21:35]   Loaded.
[16:21:35]  Loaded 3 plugins.

[16:21:35] 
[16:21:35] Ban list
[16:21:35] --------
[16:21:35]  Loaded: samp.ban
[16:21:35] 
[16:21:35] 
[16:21:35] Filter Scripts
[16:21:35] ---------------
[16:21:35]   Loading filter script 'LuxAdmin.amx'...
[16:21:35] 
 ___________________________________________________
[16:21:35]  
[16:21:35]                    L.A.S v1.6 Beta                         
[16:21:35]                  ---------------
[16:21:35]              LuX Administration System               
[16:21:35]  ___________________________________________________

[16:21:35]  -> Loading...
[16:21:35] 
 -Current Configurations Successfully Loaded!
[16:21:35] 

[16:21:35]  -> L.A.S Basic Loaded Configurations:

[16:21:35]  AutoLogin:    [Enabled!]  ReadCmds:  [Enabled!]
[16:21:35]  AntiSwear:    [Disabled]  AntiSpam:  [Enabled!]
[16:21:35]  NameKick:     [Enabled!]  AntiBot:   [Enabled!]
[16:21:35]  ConnectMsgs:  [Enabled!]  NoCaps:    [Disabled]
[16:21:35]  AdminCmdMsgs: [Enabled!]  Anti Ads:  [Enabled!]
[16:21:35]  SaveMoney:    [Enabled!]  MustLogin  [Enabled!]
[16:21:35]  Forbid Weaps: [Disabled]  AdmSkins:  [Disabled]
[16:21:35]  ReadPms:      [Enabled!]  MaxLevel:  [10]
[16:21:35]  SaveWeaps     [Disabled]  Max Ping:  [0ms]
[16:21:35]  ChatDisabled: [Disabled]  MuteWarns: [4]
[16:21:35]  MustRegister: [Enabled!]  AdmSkins   [217, 214]

[16:21:35]  -> Loaded Successfully!

[16:21:35]  Date: 21/4/2011 - Time: 16:21:35
[16:21:35]  ___________________________________________________

[16:21:35]   Loading filter script 'antihax.amx'...
[16:21:35] 
--------------------------------------
[16:21:35]  AntiHax - Anticheat by Duxtray loaded
[16:21:35] --------------------------------------

[16:21:40]   Loading filter script 'headshot.amx'...
[16:21:40] 
--------------------------------------
[16:21:40]  Infinite-Gaming.com Presents:
[16:21:40]  BoOm Headshot v1 by Tannz0rz && Cyber_Punk
[16:21:40] --------------------------------------

[16:21:40]   Loading filter script 'LuxAFKv2.amx'...
[16:21:40] 

[16:21:40] _________________________________
[16:21:40]                                  
[16:21:40]   LuX Ultimate AFK System v2.0   
[16:21:40]          -------------           
[16:21:40]           By LuxurioN            
[16:21:40] _________________________________
[16:21:40] 

[16:21:40]   Loading filter script 'Animations.amx'...
[16:21:40]   Loading filter script 'espeed.amx'...
[16:21:40]   Loading filter script 'MidoStream.amx'...
[16:21:40]   Loading filter script 'Version0.2.amx'...
[16:21:40] 

    --------------------------------------------     

[16:21:40]              Zones & Carnames GTA IV style
[16:21:40]                      By Cacoby
[16:21:40] 
    --------------------------------------------     


[16:21:40]   Loading filter script 'TRank.amx'...
[16:21:40] 
--------------------------------------
[16:21:40] [FS] Rank System v.1 Loaded Succesfully !!
[16:21:40] --------------------------------------

[16:21:40]   Loading filter script 'Playlist.amx'...
[16:21:40] *** Audio Plugin: Started TCP server on port 6666
[16:21:40]   Loading filter script 'TopSpree.amx'...
[16:21:40]   [file] Loaded data from file 'Topkillers2011.sav'
[16:21:40]   Loaded 11 filter scripts.

[16:21:40] Script[gamemodes/CODSW11.amx]: Run time error 19: "File or function is not found"
[16:21:40] Number of vehicle models: 0
Reply
#12

Bro, You got too Many FilterScripts.
Reply
#13

11 Filter-scripts will lag your server up the ass man. :/
Reply
#14

so what do you guys suggest?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)