Reimann 10 Posted May 9, 2010 (edited) I have variable initialised in the init.sqf (guns = 0;) and two scripts with the following: guns = guns +1; publicVariable "guns"; hint format ["%1/2 gun", guns]; if (guns == 2) then { _handler = [player,nil,rSIDECHAT, "Hint Message2."] call RE; }; In preview, things work as expected, calling the script once will give "1/2 guns" hint and the second time 2/2 and the message. When I put it on a dedi however, all I get is the hint "scalar/2 guns". I assume 'scalar' in this context means undefined variable, but I can't figure out why. Ed: Putting the hint at the start of the trigger turns 'scalar' into 'any'. The init seems fine, though - other variables are being initialized, other commands further down in the init are working... Edited May 9, 2010 by Reimann Share this post Link to post Share on other sites
galzohar 31 Posted May 9, 2010 in init.sqf initialize the guns variable only on the server and publicVariable it (aka guns=0; publicVariable "guns";), and then at the start of this script add the line waitUntil {!isNil "guns"}; so that this script doesn't run before the variable is initialized by the server. Share this post Link to post Share on other sites