In a textfile, I have this:
PHP Code:
Leader=Leader
Leader.1=KuJi
Leader.Generals=Generals
Leader.Generals.1=General1
Leader.Generals.1.1=Test1
Leader.Generals.2=General2
Leader.Generals.2.1=Test1
Leader.Generals.2.2=Test2
Leader.Generals.3=General3
Leader.Generals.3.1=Test1
Leader.Generals.3.2=Test2
Leader.Generals.3.3=Test3
On serverside, I load the text file to an object, then save it as an array and trigger it to the clientside.
PHP Code:
this.gang_ranks = new TStaticVar();
this.gang_ranks.clear();
this.gang_ranks.loadvars("/gangs/" @ params[1] @ "_ranks.txt");
temp.rankholder = this.gang_ranks.savevarstoarray(true);
Then I load it in a tree. Only thing is temp.rankholder doesn't keep the same sort order as the text file and it mixes up the order of the ranks which in the tree view mess it up. So I couldn't find out why, so I tried to find a way to get the treenodes to sort and I can't get that to work either. If you know how to make the vars not sort, or you know how to sort treenodes please help :o