Tom_48_97 523 Posted August 1, 2007 Hello all, I've just a little problem, so, what's wrong ?! <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _Num = _This Select 0; switch (_Num) do {   case 0:   { HintC "Test 1\nReturn 0" Player SideChat "0"   };   case 1:   { HintC "Test 1\nReturn 1" Player SideChat "1"   };   default   { HintC "Test 1\nReturn None" Player SideChat "No value"   }; }; Exit; And it doesn't work, it execute all "SideChat" and all "HintC"... Look by yourself : http://www.shark-bambi.fr/deposite/Divers%7F/Prob_sqf.gif When I do like this, that's okay  <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Num = _This Select 0; switch (_Num) do{case 0:{HintC "Test 1\nReturn 0";Player SideChat "0"; }; case 1:{HintC "Test 1\nReturn 1";Player SideChat "1";   };}; Exit; Edit : How to call it ? [] exec "something.sqf" take the syntax like an SQS file :/ So How to call this script in order to have an SQF syntaxe ? Thanks to all Share this post Link to post Share on other sites
mtlgd 0 Posted August 1, 2007 execVM. http://www.flashpoint1985.com/cgi-bin....t=66048 Mtl Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted August 1, 2007 You also need semicolons after every line in sqf, since whitespace is meaningless in that regards. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _Num = _This Select 0; switch (_Num) do { case 0: { HintC "Test 1\nReturn 0"; Player SideChat "0"; }; case 1: { HintC "Test 1\nReturn 1"; Player SideChat "1"; }; default { HintC "Test 1\nReturn None"; Player SideChat "No value"; }; }; Exit; Share this post Link to post Share on other sites