i trying to get a user defined variable in intgr form to be shared between scripts.
example.
gets the user input fine.Code:_amountofbombs = ctrlText 4; if (!(_amountofbombs call ISSE_str_isInteger)) then {_amountofbombs = "0";}; _amountofbombs = _amountofbombs call ISSE_str_StrToInt; if (_amountofbombs < 0) then {_amountofbombs = 0;};
then
calls the next script to activate when button pressed.Code:buttonSetAction [3, format["if ((lbCurSel 1) >= 0) then {[(lbData [1, (lbCurSel 1)]), %1, ctrlText 4] execVM ""createbombs.sqf""; closedialog 0; [0,0,0,[%1]] execVM ""bombshopdialog.sqf"";};", _bombshopNum] ];
but the next script wont get any variables from previous scripts.
should i define as follows?
in first script:
in script that activates on button:Code:_bombcounter setVariable ["mycounter", _amountofbombs, true];
and do i need to define _bombcounter in my init.sqf?Code:_amountofbombs = _bombcounter getVariable "mycounter";
or am i just having a brain fart?
any help welcomed
HOME
Reply With Quote
