I'm having a bit of trouble with reading from an ini file with an 'on text' script. I have this in the Aliases section and works when i type '/commandtest 1' into the mIRC chat:

Code:
/commandtest { msg $chan $readini(file.ini,items,$1) }


The problem is when I try using an 'on text' script to call the command it doesn't seem to work, nothing comes up:

Code:
on *:text:!commandtest *:#:{
  commandtest $2- { msg $chan $readini(file.ini,items,$1) }
}


I also tried reading from the ini without using an alias but that didn't work either, I tried:

Code:
on *:text:!commandtest *:#:{
  msg $chan $readini(file.ini,items,$2-)
}


If anyone could help me I would really appreciate it, I'm probably doing something really stupid but I can't get it to work.
Many thanks, Tom.