Jump to content
Sign in to follow this  
KernelPanicAkr

Problems declarating functions in Addon

Recommended Posts

Hi!, I'm trying to create a server-side Addon, but I'm getting trouble in declarating my functions in CfgFuntions.

I'm used to the description.ext way, and I thought it would be the same with Addons, but they don't get compiled at all.

Dumping config.cpp. All paths are correct, just like description.ext, and no "No found" error, just nothing pops out, but I get "Undefined" error when calling any function. I could use some help.

class CfgPatches 
{
class Addon_core
{
	units[] = {};
	weapons[] = {};
	fileName = "Addon_core.pbo";
	author[] = {"User"};
	requiredVersion = 1.000000;
};
};

class CfgFunctions 
{
class PL_Core
{
	tag = "PL";
	class Core
	{
		file = "code";
		class asyncInit {};
	};
	class Config
	{
		file = "code\Config";
		class loadConfiguration {};
	};
};
}

Edited by Akryllax

Share this post


Link to post
Share on other sites

Hi!

Your config is wrong; here's a little template :

class cfgFunctions {
createShortcuts = 1;

class MyFunctions {
	tag = TAG;
	class my_functions_main {
		class function1 { //TAG_fnc_function1
			file = "\code\functions\fn_function1.sqf";
			description = "";
		};
		class function2 { //TAG_fnc_function2
			file = "\code\functions\fn_function2.sqf";
			description = "";
		};
	};
};
};

Take a look at Arma3 functions config, it will give you a better idea of how it works.

Edited by Pepe Hal

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×