daniel1060 11 Posted April 20, 2017 Right so I'm new to scripting in .SQF, basically my problem is that I have an If statement that is meant to run on a dedicated server but is not executing the correctly. I have set up a global variable, (cash), which is set to hold integers, however, when I put the variable in an if statement it thinks that it is expecting a boolean and not an integer. init.sqf Spoiler if (isServer) then { cash = 0; publicVariable "cash"; sample if statement Spoiler if (isServer) then { if cash < 50000 then {notenough.sqs} else { cash = cash - 50000; _AH6J = "CUP_B_AH6J_Escort_USA" createVehicle [9801.48,12574.9,0]; _AH6J setDir 220; }; }; Note I have it set to (isServer) because I am testing it on a server hosted by my machine Share this post Link to post Share on other sites
beno_83au 1362 Posted April 20, 2017 Just as isServer is wrapped brackets, so must cash < 50000 be: if (cash < 50000) then { All if then conditions must be wrapped in ( ) and return true/false. Share this post Link to post Share on other sites
daniel1060 11 Posted April 20, 2017 Thanks mate I can be pretty dumb sometimes Share this post Link to post Share on other sites