Code:
for {
  if ($1 isnum) {
    set %place 1
    while ($gettok($3-,%place,59) != $null) {
      ;executes each section seperately, divided by $chr(59)
      set %tok $gettok($3-,%place,59)
      set %subplace 1

      if (%place == 1) {
        ;first section. Initializes variables, in "variable = value" format. Each statement seperated by commas.
        while ($gettok(%tok, %subplace, 44) != $null) {
          set %subtok $gettok(%tok, %subplace, 44)
          echo -a $gettok(%subtok,1,61) | ;shows that the first token exists
          echo -a $gettok(%subtok,2,61) | ;shows that the second token exists
          set % [ $+ [ $gettok(%subtok,1,61) ] ] $gettok(%subtok,2,61)
          inc %subplace
        }
      }
      inc %place
    }
  }
}
 


For some reason, the line:
set % [ $+ [ $gettok(%subtok,1,61) ] ] $gettok(%subtok,2,61)
isnt setting the tokens that it should be. The echos tell me the correct tokens, but the set isnt doing it. The for loop is in the following format:

/for 1 arb var = 1
where 1 is an arbitrary number (atm) and so is arb. Thanks in advance.