Now i've never been good with arrays and i have just spent hours trawling through the forums to find and answer to my problem but to no avail... so here we go...
i have my inventory array set up quite simply as:-
GLOBAL DIM InvThing() as InvThing
and at current i have two items to put into said Inventory, a key and some paper, now if i pick up the key first and then the paper and then use the paper (thus deleting it from the array) everything works fine, but if i pick up the paper and then the key and use the paper i get the runtime error 118 array doesn't exist or subscript out of bounds, now i found loads of threads about this error but nothing seems to solve my issue... and it's in this nest of code where it says the error lies :-
for II= 0 to array count(InvThing())
if InvThing().ItemName= "Paper"
array delete element InvThing()
else
next array index InvThing()
endif
next II
fro what i can gather it's because It calls for the Array count but then having to delete an object from it the array count is then wrong so it spazzes out yes? Arrays have always been a cause for headaches for me so any help here would be great.
I can see from your smile, you're not here for the sunset
Windows 7 64 bit, AMD Phenom II x4 Black edition, 7 GB Ram, Radeon HD 4650, 3.6 TB HDD