25-07-2007, 09:46 PM
JUst add a small checK:
This will solve the error but if you get problems you should dig more into were it starts etc.
Code:
If invslot < 0 or invslot > MAX_INV then exit sub
if itemnum < 0 or itemnum > MAX_ITEMS then exit sub