shuko 59 Posted August 17, 2009 Could someone tell me why this is giving Undefined variable "_tsk" at the if line. I'd understand if it was null or something, but undefined? _tsk = []; _tsk = (TASKS select _i); if ((_tsk select 0) == _g) then { Whole file (Yes, there are _tsk=[] multiple times as Im testing...) Share this post Link to post Share on other sites
Murklor 10 Posted August 17, 2009 Well a guess would be that it gives undefined variable if your TASKS isnt an array-in-an-array variable. What is TASKS? I'm not familiar with Arma briefings at all, lol. Sidenote: does for "_g" from 0 work in an sqf? Share this post Link to post Share on other sites
-ASA-ODEN 0 Posted August 17, 2009 Code sure looks intact but I would expect a "select error" since you run from 0 to count and not 0 to count -1. would be intresting to see the data that comes with "_tsk select 0", maybe the engine interprete it as a varName. The "error positioning" might be illusive too. Could you paste relevant part from rpt file? Share this post Link to post Share on other sites
Bad Pilot 0 Posted August 17, 2009 for "_i" from 0 to (count TASKS_SERVER) do { for "_g" from 0 to (count TASKS_GROUPS) do { ... I also want to know: is this how For loops are done now?:butbut: Share this post Link to post Share on other sites
f2k sel 164 Posted August 17, 2009 Some times if you don't call the code correctly ie missing null off if it's sqf or using exec to call sqf. _i and _g need to be defined. Share this post Link to post Share on other sites
shuko 59 Posted August 17, 2009 ODEN;1408739']I would expect a "select error" since you run from 0 to count and not 0 to count -1. That was it, thanks for helping the blind man. :) Share this post Link to post Share on other sites