calo_mir 10 Posted August 12, 2009 Do we have them already or do I need to write one? Share this post Link to post Share on other sites
Big Dawg KS 6 Posted August 12, 2009 Not exactly, but there are alternatives. Share this post Link to post Share on other sites
calo_mir 10 Posted August 12, 2009 It's all pretty hypothetical at this point. I'd like to store a pair of values - the number of shots fired and the number of shots that actually hit a target. Multiple targets, indexed by distance: targets [distance].shots_fired = 3; targets [distance].shots_hit = 2; etc. ---------- Post added at 05:13 PM ---------- Previous post was at 05:11 PM ---------- I realise we don't have composite types or anything like that... Share this post Link to post Share on other sites
Big Dawg KS 6 Posted August 12, 2009 I will agree that more data structures would be nice, however many wouldn't be used enough to be worth implementing IMO. Share this post Link to post Share on other sites
calo_mir 10 Posted August 12, 2009 I've just noticed that the CBA has them: http://dev-heaven.net/docs/cba/files/hashes/fnc_hashCreate-sqf.html Share this post Link to post Share on other sites
rübe 127 Posted August 14, 2009 (edited) well, sure you can easily implement your own assoc. arrays, but where is the point? It's so ugly to do call's for simple array manipulation... I mean.. call hashCreate? ...call hashGet/hashSet? oh boy.. and I've thought coding should be fun.. hehe assoc. arrays would be definitely welcome, but nicely implemented for they are nothing other than syntactic sugar. Making ugly syntactic sugar (salt!) is rather pointless (though I can understand that you rather have such an ugly implementation than no assoc. arrays at all. (no offense at the CBA team, that's not the point, hehe)) Anyway, the data structre needed the most is IMHO an object, like they're implemented in ECMA script. Heck, give us ECMA script and drop the BISscript alltogether. Yay! Edited August 14, 2009 by ruebe Share this post Link to post Share on other sites