Al right, sorry for not posting, I've been busy with non-toolkit-stuff, and I probably will be busy for some time forward. Anyway, This is an exact step by step of what I do:
The game starts. I activate a program that gives me a piece of equipment and the menu-only item Weirdbook.itm. On the same board, I activate another program, which gives me a health potion, and lots of lots of gold. I leave the board, and step on a tile that activates the program for item using, which can be seen in another post. Now, in the MWin, this is what can be seen:
1-Weirdbook.itm
2-Healthpotion.itm
3-
4-
Now, if I press, for example, 3, I get an error message which tells me that there isn't any item named ".itm", and the Mwin says that "You used". That's not a problem, and I will add something that fixes that whenever I think I need to.
If I press 1, to use the Weirdbook, then This[/b] appears in the Debug window:
Error: Method not found!-- #FileRead("prg",item_prg$,"tempfile",0,numlines!)
I have no idea what it is or what it's for, and to help you even more, I will now give you the program for the Weirdbook:
#Fontsize(15)
#Mwin("This book cannot be thrown away")
#Wait(awit$)
#mwincls()
Yeah, I know, weird book, huh?
And finally, if I press the famous 2, for the Healthpotion.itm, this is what happens:
The MWin says: "You used Healthpotion.itm!"
And then, I don't have any health potion anymore, plus that my health increased a little.
So, that's what happens if I use any item ONCE. Now lets look at what happens if I use them Twice!
So, I start over from the very beginning, I get the same items in the same order as above. I use item number 3 first (No item at all) and the very same thing that happened above happen again. Now, If I activate the item menu again, I get the exactly same error message as when I tried to use the item (Ok, that sounded wrong, I meant when I tried to use no item at all). Al right, so you shouldn't actually be able to use no item at all from the very beginning, but still.
So, what if I try to use the weirdbook again? Well, exactly the same thing as above happened, that weird error message appears, and nothing else.
So, now to the exciting part. We all know, that if you use the health potion once, and you only have one from the beginning, you no longer have any health potions left. But, in my strange item menu, it still says that you have a health potion!!! I know! It's the whole reason for this topic to exist! So, what happens when you try to use the virtual potion?
Exactly the same thing as above, only difference is that this time, the word ERROR flashes on the MWin really fast, before it disappears. But do you recover any health? YES! Surprisingly enough, you DO recover some health! Well, now that I look at the code, it's not that surprising, since it doesn't check if you have no items, it only checks if you have LESS than no items. So, it's not that surprising. I'll have to fix that.
Well, what if I actually pick up more than one health potion, then? Well, I just checked. And nothing special happened. You lost one item each time you used a potion, and everyone is happy.
But what if you pick up the items in a different order? Now THIS proved to be an important question. I tried to pick up the potion FIRST, and the book after. I used the book on my custom little menu, and that confusing error message appeared. However, if I used the potion, then the potion would disappear. But if I looked on my custom menu again, I wouldn't have any items at all!! That's right, This is how it looked:
1-
2-
3-
4-
I was so shocked! And in the real menu, I still had the weirdbook! How monumentally confusing!
And what if I try to use more items? To experiment with this, I created an item called fgiyr. I got the name adfter randomly pressing some buttons on my keyboard. Anyway, I try to use the fgiyrs, which I by the way bought in a non-custom shop. If I used them when they were bought last, they just disappeard aftyer I had used them, just like they should.
However, I created a little program which only purpose should be to give me a fgiyr. So, i used it twive, and got two fgiyrs. Then I got the other items, the book and the potion. And I used the fgiyr. First, one fgiyr disappeared. Evrything else remained intact, even the weirdbook, EVEN on my custom menu. Scary. Then I used the other fgiyr. And THEN everything disappeared on my custom menu, and it was really really empty.
So, I guess that when you run out of the item which appears first, all the variables die forever and cannot be used again. Or something. Probably not.
I hope this helps anyone who wants to help me. It probably doesn't, but maybe, somewhere........