My bank hates me!

BlitzMax Forums/BlitzMax Programming/My bank hates me!

Pineapple(Posted 2009) [#1]
			While BankSize(combo.bank)<>98
				ResizeBank combo.bank,98
			Wend
			For x=pos+cw*ch To oldsiz
				Print x
				PokeByte combo.bank,x,PeekByte(combo.bank,x+needs)
			Next


when x=2, (which is the bank's original size), the program gives me a lovely little error - 'Unhandled Exception: Illegal bank offset'

WHY???


EDIT: Ok, I was forgetting about the peekbyte call. false alarm, people. get back to work.


GfK(Posted 2009) [#2]
With a bank of 2 bytes size, shouldn't you be using either 0 or 1 for the offset param?

Other than that, you'll need to post more code. You have a lot of vars in there that we do not know the definition of.


ImaginaryHuman(Posted 2009) [#3]
Or else use Until instead of To in your For loop?