Home   Help Search Login Register  

Author Topic: Trouble Getting New Param System to Work  (Read 1555 times)

0 Members and 1 Guest are viewing this topic.

Offline GeneralCarver

  • Members
  • *
Trouble Getting New Param System to Work
« 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);

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: Trouble Getting New Param System to Work
« Reply #1 on: 24 Sep 2009, 03:46:49 »
Hmm, double-check the spelling of paramsArray?
try { return true; } finally { return false; }

Offline GeneralCarver

  • Members
  • *
Re: Trouble Getting New Param System to Work
« Reply #2 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.

Offline Shuko

  • Members
  • *
Re: Trouble Getting New Param System to Work
« Reply #3 on: 24 Sep 2009, 08:58:15 »
paramArray is not same as paramsArray ;)

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: Trouble Getting New Param System to Work
« Reply #4 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. 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.
try { return true; } finally { return false; }