Jump to content
Sign in to follow this  
kbbw123

AdvHints broken by me or broken to begin with?

Recommended Posts

Okay this is my Advhint

AdvancedHints.hpp:

class CfgHints
{	
class M1
{
	displayName = "Mission Completed";
	class missiondone
	{
		arguments[] = {};
		displayName = "missions Completed";

		description = "You have completed the Missions";
		tip = "This mission is completed call an Extraction to get you out of here";
		image = "\a3\ui_f\data\gui\Cfg\Hints\tasks_ca.paa";
	};
};
};

the script to call the hint

Task.sqf

waitUntil { !isNull player }; //<-- make's it JIP
waitUntil { player == player };
sleep 0.1;

Obj_1 = player createSimpleTask ["Clear Molos"];
Obj_1 setSimpleTaskDestination (getMarkerPos "M2");
Obj_1 setSimpleTaskDescription [ 
"Clear the town of Molos of all FIA personal", 
"Clear Molos", 
"Clear" 
];
Obj_1 setTaskState "CREATED";

waituntil {taskState Obj_1 == "Succeeded"};

if (isNil "Obj_2") then { 
Obj_2 = player createSimpleTask ["Assault Molos Airlfied"];
Obj_2 setSimpleTaskDestination (getMarkerPos "M3");
Obj_2 setSimpleTaskDescription [ 
"Destroy all AAF assets on the airfield", 
"Asault Molos Airfield", 
"Assault" 
];
Obj_2 setTaskState "CREATED";
};

waituntil {taskState Obj_1 == "Succeeded"} && {taskstate Obj_2 == "Succeeded"};

["Missiondone", 20, "", 40, "", true, false, true, true] call BIS_fnc_advHint;

and the error i get:

18:14:34 Error in expression <ss;
} else {
_cfg = [["CfgHints",_class select 0,_class select 1],configfile >> >
18:14:34   Error position: <select 0,_class select 1],configfile >> >
18:14:34   Error Generic error in expression
18:14:34 File A3\functions_f\Hints\fn_advHint.sqf, line 46
18:28:41 Error in expression < > 2) then {
_cfg = [["CfgHints",_class select 0,_class select 1,_class select 2>
18:28:41   Error position: <select 0,_class select 1,_class select 2>
18:28:41   Error Generic error in expression
18:28:41 File A3\functions_f\Hints\fn_advHint.sqf, line 44

Now the question is did i break bis there script or is it broken to begin with ?!?

I don't have a clue

Kind regards,

KBBW

Edited by KBBW123

Share this post


Link to post
Share on other sites

When you're calling it you need an array as the first argument, currently you have a single string ("missiondone"), that should probably be ["M1","missionDone"], though if that doesn't work try it without the quotes.

EDIT: You mention that you have an advancedHints.hpp, you have included that in your description.ext (by #include "advancedhints.hpp") right?

Share this post


Link to post
Share on other sites

it was indeed the ["m1","missiondone"] that was missing... thank you!

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  

×