Jump to content
Sign in to follow this  
Trulz

Need Help with DAC and the HC

Recommended Posts

Hey,

I've built a Map on Celle 2 with the help of this DAC/HC-Tutorial. Everything's worked quite good so far but I have a problem with the DAC part of it. When I start the Mission with a HC present it gives me this error code:

What the error log says:

2013/05/18, 12:31:14 Error in expression <lse {DAC_Code = 2}};

if(name player == HCName) then {DAC_Code = 0};

if(is>

2013/05/18, 12:31:14 Error position: <HCName) then {DAC_Code = 0};

if(is>

2013/05/18, 12:31:14 Error Nicht definierte Variable in Ausdruck: hcname

2013/05/18, 12:31:14 File mpmissions\__cur_mp.mbg_celle2\DAC\DAC_Config_Creator.sqf, line 20

[/Quote]

According to the error, the error is in line 20. It should be able to find the HCName tho because it's initialized and published.

Here's the content of the DAC_Creator_Config.sqf:

//////////////////////////////

// Dynamic-AI-Creator //

// Version 3.0 - 2010 //

//--------------------------//

// DAC_Config_Creator //

//--------------------------//

// Script by Silola //

// silola@freenet.de //

//////////////////////////////

DAC_Activate = compile preprocessFile "DAC\Scripts\DAC_Activate_Zone.sqf";

DAC_Deactivate = compile preprocessFile "DAC\Scripts\DAC_Deactivate_Zone.sqf";

DAC_Weapons = compile preprocessFile "DAC\Scripts\DAC_Change_Weapons.sqf";

scalar = "any";DAC_Init_Camps = 0;

waituntil{time > 0.3};

if(isServer) then {if(local player) then {DAC_Code = 1} else {DAC_Code = 0}} else {if(isnull player) then {DAC_Code = 3} else {DAC_Code = 2}};

if(name player == HCName) then {DAC_Code = 0};

//===============|

// DAC_Settings |

//===============|=============================================================================================|

if(isNil "DAC_STRPlayers") then { DAC_STRPlayers = ["s1","s2","s3","s4","s5","s6","s7","s8","s9","s10","s11","s12","s13","s14","s15","s16","s17","s18","s19","s20"]};

if(isNil "DAC_AI_Count_Level") then { DAC_AI_Count_Level = [[2,4],[2,6],[2,8],[2,12],[5,0]] };

if(isNil "DAC_Dyn_Weather") then { DAC_Dyn_Weather = [300,120,1,0.7] };

if(isNil "DAC_Reduce_Value") then { DAC_Reduce_Value = [800,850,0.3] };

if(isNil "DAC_AI_Spawn") then { DAC_AI_Spawn = [[10,5,5],[10,5,15],0,120,250,0] };

if(isNil "DAC_Delete_Value") then { DAC_Delete_Value = [[120,150],[140,150],3600] };

if(isNil "DAC_Del_PlayerBody") then { DAC_Del_PlayerBody = [0,0] };

if(isNil "DAC_Com_Values") then { DAC_Com_Values = [1,2,0] };

if(isNil "DAC_AI_AddOn") then { DAC_AI_AddOn = 1 };

if(isNil "DAC_AI_Level") then { DAC_AI_Level = 3 };

if(isNil "DAC_Res_Side") then { DAC_Res_Side = 1 };

if(isNil "DAC_VehAllowed") then { DAC_VehAllowed = [0,1] };

if(isNil "DAC_Marker") then { DAC_Marker = 4 };

if(isNil "DAC_WP_Speed") then { DAC_WP_Speed = 0.01 };

if(isNil "DAC_Join_Action") then { DAC_Join_Action = false };

if(isNil "DAC_Fast_Init") then { DAC_Fast_Init = false };

if(isNil "DAC_Player_Marker") then { DAC_Player_Marker = false };

if(isNil "DAC_Direct_Start") then { DAC_Direct_Start = false };

if(isNil "DAC_Activate_Sound") then { DAC_Activate_Sound = false };

if(isNil "DAC_Auto_UnitCount") then { DAC_Auto_UnitCount = [8,10] };

if(isNil "DAC_Player_Support") then { DAC_Player_Support = [10,[10,2000,3,1000]] };

if(isNil "DAC_SaveDistance") then { DAC_SaveDistance = [500,["DAC_Save_Pos"]] };

DAC_BadBuildings = ["Camp","CampEast","Land_vez"];

DAC_SP_Soldiers = ["RU_Soldier_MG","USMC_Soldier_MG","GUE_Soldier_MG","CDF_Soldier_MG","Ins_Soldier_MG"];

DAC_GunAllowed = [

"Stinger_Pod","M2StaticMG","M252","M2HD_mini_TriPod","MK19_TriPod","SearchLight","TOW_TriPod","M119",

"USMC_WarfareBMGNest_M240","AGS_CDF","D30_CDF","DSHKM_CDF","DSHkM_Mini_TriPod_CDF","2b14_82mm_CDF",

"SPG9_CDF","SearchLight_CDF","ZU23_CDF","CDF_WarfareBMGNest_PK","KORD_high","Minitripod KORD","AGS_RU",

"D30_RU","Igla_AA_pod_East","Metis","2B14 2b14_82mm_RU","SearchLight_RUS","RU_WarfareBMGNest_PK","AGS_INS",

"D30_INS","DSHKM_INS","DSHkM_Mini_TriPod_INS","2B14 2b14_82mm_INS","SPG9_INS","SearchLight_INS","ZU23_INS",

"INS_WarfareBMGNest_PK","DSHKM_GUE","2B14 2b14_82mm_GUE","SPG9_GUE","SearchLight_GUE","ZU23_GUE",

"GUE_WarfareBMGNest_PK","Fort_Nest_M240"

];

//=============================================================================================================|

[]execVM "DAC\Scripts\DAC_Start_Creator.sqf";

waituntil{format["%1",!isNil 'DAC_Basic_Value'] == "true"};

sleep 0.1;

waituntil {(DAC_Basic_Value > 0)};

if(DAC_Code < 2) then

{

//===========================================|

// StartScriptOnServer |

//===========================================|

//player sidechat "ServerStart"

//[] execVM "myServerScript.sqf";

//onMapSingleClick "_fun = [_pos,_shift]execVM ""Action.sqf""";

//[[sec1,""]] execVM "DAC\Scripts\DAC_Init_Sector.sqf";

}

else

{

if(DAC_Code == 3) then

{

//===========================================|

// StartScriptOnJipClient |

//===========================================|

//player sidechat "JipClientStart"

//[] execVM "myJipClientScript.sqf";

}

else

{

//===========================================|

// StartScriptOnClient |

//===========================================|

//player sidechat "ClientStart"

//[] execVM "myClientScript.sqf";

//onMapSingleClick "_fun = [_pos,_shift]execVM ""Action.sqf""";

};

};

The content of the init.sqf where the HCName get's initialized and published:

if(isNil "paramsArray") then{ paramsArray=[0,0,0]};

//get mission parameter to see if

//HeadlessClient is present and assign its name

if(paramsArray select 0 == 1) then{

if(isServer) then{

HCPresent = true;

publicVariable "HCPresent";

};

if (!hasInterface && !isServer) then{

HCName = name player;

publicVariable "HCName";

};

} else{

if(isServer) then{

HCPresent = false;

HCName = "NOONE";

publicVariable "HCPresent";

publicVariable "HCName";

};

};

if(!isServer) then {waitUntil{!isNull player}};

DAC_Zone = compile preprocessFile "DAC\Scripts\DAC_Init_Zone.sqf";

DAC_Objects = compile preprocessFile "DAC\Scripts\DAC_Create_Objects.sqf";

execVM "DAC\DAC_Config_Creator.sqf";

//execute DAC on HC if present, otherwise on Server

if(HCPresent) then{

dac_on = false;

if(!hasInterface && !isServer) then{

execVM "dac_zones.sqf";

};

} else{

if(isServer) then{

execVM "dac_zones.sqf";

};

};

[/Quote]

Can someone see the problem there? I kinda stuck here. If you need additional code/information just tell me.

Greetings,

Trulz

Edited by Trulz

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  

×