OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: GeneralCarver on 24 Sep 2009, 03:13:53

Title: Trouble Getting New Param System to Work
Post by: GeneralCarver on 24 Sep 2009, 03:13:53
I'm having trouble referencing the param options I create in the description.ext file in the init.sqf file.

In the role selection, I can view and change the param value for mission time, but when I start the mission I get an error saying that "paramArray" is a variable which was not defined. "paramArray" is suppose to be the array you reference to get param values.

Has anyone successfully got the new param system in ArmA 2 v1.04 to work? If so, give me a hand...


Sample Code from my mission:

Description.ext Param Coding...

class Params
{
class missiontime {
// paramsArray[0]
title="Time of Day";
values[]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,1 9,20,21,22,23};
texts[]={"00:00","01:00","02:00","03:00","04:00","05:00", "06:00","07:00","08:00","09:00","10:00","11:00","1 2:00","13:00","14:00","15:00","16:00","17:00","18: 00","19:00","20:00","21:00","22:00","23:00"};
default=12;
};

};


init.sqf coding (line its erring on)...

skiptime (paramsArray select 0);
Title: Re: Trouble Getting New Param System to Work
Post by: Worldeater on 24 Sep 2009, 03:46:49
Hmm, double-check the spelling of paramsArray?
Title: Re: Trouble Getting New Param System to Work
Post by: GeneralCarver on 24 Sep 2009, 08:23:28
What?  Double check the spelling?  I think its fine. Everything there was taken from the param tutorial on this website. Other people had posted they had trouble with it also. If you see some typo please point it out.
Title: Re: Trouble Getting New Param System to Work
Post by: Shuko on 24 Sep 2009, 08:58:15
paramArray is not same as paramsArray ;)
Title: Re: Trouble Getting New Param System to Work
Post by: Worldeater on 24 Sep 2009, 09:45:29
If you're sure the spelling is OK and it's still not working then try mikey's example (http://www.ofpec.com/forum/index.php?topic=34186). It works for sure. If it does not you're either not running 1.04 or you have some other bizarre problem... :)

In this case take a look at the RPT and check your A2 shortcut.