-
09-23-2009, 09:41 PM #1
Trouble Getting New Param System to Work
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);
-
09-23-2009, 10:09 PM #2
- Join Date
- Jan 2008
- Location
- Ontario, Canada
- Posts
- 737
Re: Trouble Getting New Param System to Work
Might have found something that will help you out, a little footnote on a mission from OFPEC:
// Params0 and Params1 continue to use the old way.
Sooo, try in your init.sqf using:
EDIT:Code:skiptime param1;
Link to the OFPEC thread about it:
http://www.ofpec.com/ed_depot/index....details&id=641Last edited by beita; 09-23-2009 at 10:17 PM. Reason: Link added
-
09-23-2009, 10:23 PM #3
Re: Trouble Getting New Param System to Work
This does not work.Code:skiptime param1;
-
10-03-2009, 08:48 PM #4
Re: Trouble Getting New Param System to Work
I use the setDate method (stops the many issues with skipTime).
Code:class Params { class Month { title="Month"; values[]={1,2,3,4,5,6,7,8,9,10,11,12}; texts[]={"January","Febuary", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; default=7; code = ""; }; class Day { title="Day"; values[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31}; texts[]={"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"}; default=24; code = ""; }; class Hour { title="Hour"; values[]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}; texts[]={"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23"}; default=15; code = ""; }; class Minute { title="Minute"; values[]={00,15,30,45}; texts[]={"00","15","30","45"}; default=15; code = ""; }; };(the inclusion of time into the equation, as this adds 600 minutes as 10 hours, so this is JIP compatible).Code:_month = (paramsArray select 0); _day = (paramsArray select 1); _hour = (paramsArray select 2); _minute = (paramsArray select 3); setDate [2009, _month, _day, _hour, _minute + (time/60)];
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)



Reply With Quote

Bookmarks