quakergamer 0 Posted August 21, 2003 Hey, I am having a problem, I've made a script and I have added those lines: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_OPGWC_TANKFIRE = true ? _OPGWC_TANKFIRE = false: goto "Exit" Now I add this line to the init.sqs of any mission... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_OPGWC_TANKFIRE = false But the script gets executed anyway even if its true or false. Any way i can set it to be a global variable ? OR is this thing possible! Thanks Share this post Link to post Share on other sites
AirwolfPL 0 Posted August 21, 2003 Hey,I am having a problem, I've made a script and I have added those lines: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_OPGWC_TANKFIRE = true ? _OPGWC_TANKFIRE = false: goto "Exit" Now I add this line to the init.sqs of any mission... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_OPGWC_TANKFIRE = false But the script gets executed anyway even if its true or false. Any way i can set it to be a global variable ? OR is this thing possible! Thanks All variables starting with "_" are local variables, so it's not suprising it's not working. You've made several other mistakes too. Script will be always executed, because you are setting your variable to true just before checking if it's set to false. You're checking if variable is set to false using "=" instead of "==". You can also simplify this further - try this instead: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?OPGWC_TANKFIRE: goto "Exit" or just: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?OPGWC_TANKFIRE: Exit Now add this line to the init.sqs of any mission if you want to disable the script: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">OPGWC_TANKFIRE = true Share this post Link to post Share on other sites
quakergamer 0 Posted August 21, 2003 OK problem fixed! Thank you Airwolf! Share this post Link to post Share on other sites