To be clear: The top code is what I just had to write.
Dot syntax has some ambiguity with command and variable names. I think leaving commands (and functions?) as a reference for CALL is the easiest to figure out at compile time.
Here's the second beta of Lowerdash 0.6!
QKAEAX73
Along with bug fixes, you get nested prototype access, improved imports, and a new way to use dynamic dispatch! OH MY!
I'm curious why you would want to store these in an array, rather than just creating SPDEFs with the raw values. You can assign a name to each management number just like I did with arrays. Theres room for thousands of SPDEFs!
(Also, use Lowerdash :P)
Maybe try something like this.
Im curious what are you are trying to accomplish. These look like SPDEF values; which should probably be stored in SPDEFs...
You're creating multi-dimensional arrays, rather than array literals!
SmileBasic doesn't support creating arrays like: ["things", "in", "array"]
What you're doing is effectively creating an array of arrays of arrays of floats.
Lowerdash 0.6 is here!
NRSDAXTD
Now you can debug imports and see the callstack when things get really weird!
Check out the manual:
http://smilebasicsource.com/page?pid=59
This setup works for multiple button presses if you use the boolean operation AND. Button() is a binary number where each position is a button. ANDing that with a button ID (think binary) will match if both have a 1 in the same position.
You can do mulitples by introducing OR. 01 OR 10 is 11 because there is a 1 in one OR the other of the numbers.
So:
IF BUTTON() AND (#A OR #X) THEN
Just to note:
The Components can all update without a context switch, because they are all managed by parent modules. Most scenarios run at 1:1 speed compared to ordinary SmileBasic!
This is possible by templating out the same pattern you see in plain SmileBasic where coders use arrays and Entity IDs.
The thing everyone is missing here, is the truth-iness of those values.
Anything that is not 0 will be considered true in an IF statement.
TRUE the keyword is just 1. So the top IF is working because 1==1.
you just need:
IF BUTTON() AND #DOWN THEN