Welcome to Tactical Gamer

+ Reply to Thread
Results 1 to 4 of 4
Discussion: ArmA - Development / ArmA - Mission Development - Trouble Getting New Param System to Work - I'm having trouble referencing the param options I create in the description.ext file in the
  1. #1

    GeneralCarver's Avatar

    Join Date
    Aug 2007
    Location
    Indiana, USA
    Age
    32
    Posts
    532

    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);

  2.  
  3. #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:

    Code:
    skiptime param1;
    EDIT:

    Link to the OFPEC thread about it:

    http://www.ofpec.com/ed_depot/index....details&id=641
    Last edited by beita; 09-23-2009 at 10:17 PM. Reason: Link added

  4.  
  5. #3

    GeneralCarver's Avatar

    Join Date
    Aug 2007
    Location
    Indiana, USA
    Age
    32
    Posts
    532

    Re: Trouble Getting New Param System to Work

    Code:
    skiptime param1;
    This does not work.

  6.  

     
  7. #4

    Rommel's Avatar

    Join Date
    Sep 2009
    Posts
    119

    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 = "";
    		};
    };
    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)];
    (the inclusion of time into the equation, as this adds 600 minutes as 10 hours, so this is JIP compatible).

  8.  

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


  
 

Back to top