Understanding B4X Datastructures is a bit tricky, if i want to do some kind of SQL question:
quests(type,score) as List
where this should be somekind of array to choose the right list, means inside the list i have a custom type like xtype
now i want to have these xtypes sorted while adding means i add them to type: "hiking" or "biking" and for earch type there is one score which holds all xtypes of same type and score, means score is the value how much worthy this xtype is.
i dont know how to describe it well so i try again with an example:
quests(walk,1) consists of a list which has a customtype as item.
quests(walk,2) is another list with same content type
quests(bike,5) is same as above
means its just a sorted table of customtypes which are first sorted by kind of activity and then sorted by the score you get for doing it.
the idea behind this construct is to easily access the customtypes without sorting the list first.
use case:
user says, hey i want to bike and need a task which is 5 score points worth.
so program access the list at quests(bike,5).Get(i) where i is random.
previously i had all types and scores in one list, but this was not good to get a random item sorted by the type and score.
and no, i dont want to use sql for this
in the doc i have read, that two dimensional arrays need same length for both dimensions hm.