norbre 0 Posted March 16, 2007 hi all, I've a big problem.. I've tried to use "switch" and "if" in init.sqs but it causes an error message: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> color="blue"; if (color == "blue") then { hint "BLUE"; }; it gives this error message and no hint message: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> '|#|};' Error Missing { and int this case: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> switch (color) do { case "blue": { hint "BLUE COLOR"; }; case "red": { hint "RED COLOR"; }; }; it gives the same error message and "RED COLOR" hint message , but this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> hint color; gives a "BLUE" hint message. i dont understand what is the problem.. plz help me !!! Share this post Link to post Share on other sites
5133p39 16 Posted March 16, 2007 are you using this in a script? ..in a SQF script? Those errors looks like you put the mentioned SQF code into an SQS script. Share this post Link to post Share on other sites
norbre 0 Posted March 16, 2007 oooo thanks pal! that was the problem.. i used in init.sqs.. but in init.sqf all works good.. Share this post Link to post Share on other sites