Jump to content
Sign in to follow this  
BomosBoy

CfgFunctions not working

Recommended Posts

After i changed my dev built to the normal built and back it looks like my CfgFunctions is broken.

I changed basicly nothing but i cant call any Function that i added in CfgFunctions with the console. The strange thing is that all my functions that are called after the init.sqf are working fine. I only cant call functions from my console anymore. BIS functions working fine also. So i think there is something wrong with my CfgFunctions.

 

In the console: [] call ui_fnc_loadoutMenu;

 

Functions.hpp

class UIFunctions
{
	tag = "ui";
	
	class Master
	{
		file = "ui";
		ext = ".sqf";
	};
	
	class Functions
	{
		file = "ui\functions";
		ext = ".sqf";
                class loadoutMenu {};
                class teamMenu {};

	};
};

in the description.ext:


enableTeamSwitch = 0;
respawnButton = 0;
respawnDialog = 0;

disabledAI = 1;
aiKills = 0;

ShowGPS = 1;
showPad = 1;


class CfgFunctions {
	#include "Functions.hpp"
};

Share this post


Link to post
Share on other sites

Do you have a file called fn_loadoutMenu.sqf in your ui\functions folder?

 

That file would just be this:

hint "You're running the loadoutMenu";

and not this:

fnc_ui_loadoutMenu = {
    hint "You're running the loadoutMenu";
};

Also, your tag in this case would be "ui":

[] call ui_fnc_loadoutMenu;

Share this post


Link to post
Share on other sites

The problem is that the stuff was working (i have called all scripts fn_bla etc). After the switch to the normal branch and back all scripts not working anymore. If i call a script fnc_ui_etc from the init.sqf its working. But i cant call a script from the console like i described.

Even when i have a simple script with only systemChat "bla"; its not working if i call it from the console.

It looks like the console cant find my scripts. The funny thing is that i dont even get an error if i use wrong calls. It just dosnt do anything except the BI implemented functions.

Share this post


Link to post
Share on other sites

Can you post the contents of your ui\functions\fn_loadoutmenu.sqf please?  I just set things up exactly how you have it and it's working from the debug console for me.

 

(I fixed my mistake with the tag above, so you've got that right already)

Share this post


Link to post
Share on other sites

But i didnt changed the mission files at all. So all stayed the same. I just cant call ANY of my functions from the consol. If i call it with fnc_ui_bla from the init scripts its working. Only the console is broken. Also there is no error, nothing. I think i will deinstall arma and install it again.

Share this post


Link to post
Share on other sites

You're not answering my question.  Please read and understand this post and post the contents of your fn_loadoutMenu.sqf file here for us.  Reinstalling Arma will do nothing.

 

I believe you haven't properly formatted the function file and when you run ui_fnc_loadoutMenu all it's doing is then loading your declared fnc_ui_loadoutMenu function, which is why there's no errors since it's doing what you told it to do just not what you expect.  That's also why it's "working" when you run it from init.sqf.

Share this post


Link to post
Share on other sites

I think you missed my point. I was able to run it just 2 days ago from the console. Then i changed the branch and now its not working anymore. Its has nothing to do with the script itself. I think its a problem with the console which is not able to find my CfgFunctions or what ever.

 

My fn_loadoutMenu.sqf is without any errors and is working fine. Like i said its not the script, its the consol in my opinion.

disableSerialization;

private["_display"];

_display = uiNamespace getVariable "loadoutUIMenu";
(_display displayCtrl 4000) ctrlShow true;
systemChat "loadout menu open";

Iam btw not a noob in terms of coding. Such mistakes are normally not happening. Iam working on a small project and now the console is broken so i cant test scripts and thats very annoying.

 

In my script not even the systemChat output is there. I tested 5 scipts and even a simple script with hint "bla"; and NOT A SINGLE SCRIPT is working.

Share this post


Link to post
Share on other sites

Odd.  I was testing on Dev Branch, were you using Stable perhaps?

Share this post


Link to post
Share on other sites

I developed on dev then i switched to stable and it stopped working. then i switched back to dev and still not working.

 

 

UPDATE:

I switched to apex preview downloaded some GB and now its working again. I will stay on the apex built i hope it wont happen again.

Share this post


Link to post
Share on other sites

Yea still thank you for your time! I hope when apex is out and iam forced to switch that the consol stays fine.

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  

×