Jump to content
Sign in to follow this  
Rough Knight

init.sqf problem.

Recommended Posts

Hey chaps,

My mission has taken me way to long as unfortunatley as I haven't had anything to do with scripting before. It is a work in progress and my mission is slowly coming along.

My init.sqf calls in the support packV2 script of Zonekillers and also the POW capture script from Norrin. I can get each individual script to work fine on its own, but when my init file trys to call in both I get black text errors during the mission typically saying (; missing). I figured it must be in how I have written the init.sqf which I have listed below as that is the only difference.

Can anybody see any basic errors, as I said I can get both scripts to work on their own without black text errors in game but not together.

Quote[/b] ]

[] execVM "SupportV2\Support_CFG.sqf";

/*

INITIALISATION SCRIPT

************************************************** ************************************************** **************************

Start init.sqf

*/

//init.sqf settings for POW script

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

_NORRN_POW = [prisoner];

if (isServer && time < 2) then {{call compile format ["NORRN_POW_%1 = false; publicVariable 'NORRN_POW_%1'", _x]** forEach _NORRN_POW**;

if (!isNull player) then

{

{[_x, _NORRN_POW]execVM "POW_sqf\POW_join_action.sqf"** forEach _NORRN_POW;

**;

[] execVM "POW_sqf\trigger_mkr.sqf";

if(true) exitWith {**;

Thanks again for your time.

Frosty

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] execVM "SupportV2\Support_CFG.sqf";

//init.sqf settings for POW script

if (!isServer) then

{

waitUntil{!isNull player};

};

_NORRN_POW = [prisoner];

if (isServer && time < 2) then

{

{call compile format ["NORRN_POW_%1 = false; publicVariable 'NORRN_POW_%1'", _x]} forEach _NORRN_POW;

};

if (!isNull player) then

{

{[_x, _NORRN_POW]execVM "POW_sqf\POW_join_action.sqf"} forEach _NORRN_POW;

};

[] execVM "POW_sqf\trigger_mkr.sqf";

if(true) exitWith {};

All your closing }: had ** instead, look at your original post. wink_o.gif

Share this post


Link to post
Share on other sites

Ahh sorry for wasting your time Rommel. That must be a forum bug where I copied my text from. I didn't notice when I posted here. I'll amend my code which should be same as what you have written hopefully : ).

My actual code is here :

Quote[/b] ]

[] execVM "SupportV2\Support_CFG.sqf";

/*

 INITIALISATION SCRIPT

******************************************************************************************

************************************

Start init.sqf

*/

//init.sqf settings for POW script

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

_NORRN_POW = [prisoner];

if (isServer && time < 2) then {{call compile format ["NORRN_POW_%1 = false; publicVariable 'NORRN_POW_%1'", _x]} forEach _NORRN_POW};

if (!isNull player) then

{

{[_x, _NORRN_POW]execVM "POW_sqf\POW_join_action.sqf"} forEach _NORRN_POW;

};

[] execVM "POW_sqf\trigger_mkr.sqf";

if(true) exitWith {};

I will also remove addons (I have RS Hind) in map so my arma.rpt file is a lot easier to read. That seems to contain all the errors it is seeing. I will repost shortly.

Thanks again

Frosty.

Share this post


Link to post
Share on other sites

Ok you may have a bugged version of the POW script that manifests only when you use it with other scripts that use the private command line.

Can you open the POW_join_action.sqf script which you can find in the NORRN_capture folder.

Look for a line near the top that says private. If its followed by an equals sign ie. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private = ["_unit", "_POW", "_c"];

change it so it looks like this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private ["_unit", "_POW", "_c"]; and that will hopefully fix your problem.

Share this post


Link to post
Share on other sites

Hi Guys,

Thanks Norrin that fixed my problem. I would\could never have found that on my own.

Thanks for the script too, it has made my mission much easier to make.

I'm just playing around really trying to learn how to do a few things, some of which would be impossible for me without scripts like this. : )

Cheers mate.

Frosty

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  

×