Okay then. Well I switched to trying to use simple arrays to do the same job, but I'm having an issue trying to use a variable to determine the element I want to look at.

Code:
on *:TEXT:-test*:#: {
  var %test
  set %test[0] bob
  set %test[0].ign ign1
  set %test[1] joe
  set %test[1].ign ign2
  set %test[2] tim
  set %test[2].ign ign3
  set %test[3] george
  set %test[3].ign ign4
  
  remini Test.ini List
  var %i = 0
  var %cur = %test[%i]
  ;this current part isn't working

  msg $chan %cur
  while (%test[%i] != $null) {
    writeini Test.ini List %test[%i] %test[%i].ign
    ;again this part isn't working
    inc %i
  }
  
  msg $chan saved? %anum
}


I'm pretty sure this isn't the best way the implement the arrays from what I've seen (which use an array table or something), but it's the simplest. It DOES work if I tell it to access an actual number element instead of %i. Like displaying %test[0] shows "bob" and %test[0].ign shows ign1 but having %i = 0 returns nothing.

Last edited by Gotex007; 14/12/13 10:32 AM.