Announcement

Collapse
No announcement yet.

Trouble Getting New Param System to Work

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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);
    Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity. - General George S. Patton.

  • #2
    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, 09:17 PM. Reason: Link added

    Comment


    • #3
      Re: Trouble Getting New Param System to Work

      Code:
      skiptime param1;
      This does not work.
      Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity. - General George S. Patton.

      Comment


      • #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 = "";
        		};
        };
        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).

        Comment

        Connect

        Collapse

        TeamSpeak 3 Server

        Collapse

        Advertisement

        Collapse

        Twitter Feed

        Collapse

        Working...
        X