View Single Post
  #5  
Old 05-15-2005, 04:56 PM
Evil_Trunks Evil_Trunks is offline
Evil
Evil_Trunks's Avatar
Join Date: Dec 2004
Posts: 391
Evil_Trunks is on a distinguished road
it's basically an easier to use string list, i think

normally when you want to create a structure like this

NPC Code:
item1
- sub info 1
- sub info 2
- sub info 3
item2
- sub info 1
- sub info 2
- sub info 3
item3
- sub info 1
- sub info 2
- sub info 3



you have to use a long string list:

NPC Code:
sub info 1,sub info 2, sub info 3, sub info 1,sub info 2, sub info 3, sub info 1,sub info 2, sub info 3



and use simple math to figure out where the info is (the index is i*n+3 for this example, where i is the item and n is the sub item)

with a multidimensional array, it's a little easier

NPC Code:
array = {{sub info 1,sub info 2, sub info 3},{sub info 1,sub info 2, sub info 3}, {sub info 1,sub info 2, sub info 3}}



you can access the items with:

array[i][n]
__________________

Reply With Quote