it still dont work and ive even tried adding the t switch to all $read identifiers with no avail plus when it writes the text it removes any multiple spaces as well as the square brackets and thats removed in the $read it wasn't isnt matching some text it should be
Code:

alias cheatupdate {
  var %cs.cheat = "D:\Emulation\Arcade\Emulators\Mame 32\cheat.dat"
  var %cs.cheatu = "D:\Emulation\Arcade\Emulators\Mame 32\cheatu.dat"

  if ($exists(%cs.cheat) != $false) && $& 
    ($exists(%cs.cheatu) != $false) {
    var %cs.cheatulines = $lines(%cs.cheatu)
    var %cs.increase = 1

    write -i %cs.cheat

    while (%cs.increase <= %cs.cheatulines) {
      if ($read(%cs.cheatu,%cs.increase) != $null) {
        if (;* iswm $read(%cs.cheatu,%cs.increase)) && $&
          ($read(%cs.cheat,w,$read(%cs.cheatu,%cs.increase)) == $null) {
          write %cs.cheat $read(%cs.cheatu,%cs.increase)
        }
        elseif ($read(%cs.cheat,w,* $+ $&
          $+ * $+ $gettok($read(%cs.cheatu,%cs.increase),2,58) $&
          $+ * $+ $gettok($read(%cs.cheatu,%cs.increase),3,58) $&
          $+ * $+ $gettok($read(%cs.cheatu,%cs.increase),4,58) $&
          $+ * $+ $gettok($read(%cs.cheatu,%cs.increase),5,58) $+ *) == $null) {
          write %cs.cheat $read(%cs.cheatu,%cs.increase)
        }
      }
      else { 
        write -i %cs.cheat
      }      
      inc %cs.increase
    }
  }
}

The only bit that should need to be fixed is this bit
Code:

      if ($read(%cs.cheatu,%cs.increase) != $null) {
        if (;* iswm $read(%cs.cheatu,%cs.increase)) && $&
          ($read(%cs.cheat,w,$read(%cs.cheatu,%cs.increase)) == $null) {
          write %cs.cheat $read(%cs.cheatu,%cs.increase)
        }
      }

Last edited by Hammer; 15/02/03 07:41 AM.