In reply to: grrr... -- Tidus 02:11:06 12-10-2005
Well... Posted by: Xorlak 11:16:20 12-10-2005 |
Didn't test it, but it looks like the first block (itemcount[i!]!=0) gets hit and itemcount[i!]! isn't 0 any more, so the second block gets hit. Just use ">=" and one #if.
#method itemgive(stuff$,itemamount!)
{
#include(item.prg)
#for(i!=1;i!<31;i!=i!+1)
{
#if(itemcount[i!]!>=0)
{
#if(item[i!]$="")
{
#item[i!]$=stuff$
#itemcount[i!]!=itemcount[i!]!+itemamount!
#if(itemcount[i!]!>99)
{
#itemcount[i!]!=99
}
#i!=31
}
}
}
}