Poke, PeekByte
BlitzMax Forums/BlitzMax Beginners Area/Poke, PeekByte
Yep, I'm stuck with another OldBlitz->BlitzMax problem.
Poke and PeekByte have fewer params now, how do I convert my old Peek stuff into new school Blitzmax Peek? :)
Uhhh no they don't.....
BPlus
-PeekByte(bank,offset)
-PokeByte bank,offset,value
BMax
-PeekByte( bank:TBank,offset )
-PokeByte( bank:TBank,offset,value )
0.o
"Or am I missing something here?" - Scienthsine
Well I get 'too many function parameter' error when I copy and paste Blitz2D code into Blitzmax.
The commands in the Blitz2D code have 4 parameters attached to them.
uhm ... can't recall stuff from that long aho .. but uhm..
4 ??
logically thinking, for poke you need
- a bank
- an adres
- a value
for peek you need:
- a bank
- an adres
The type is embedded in the command, so that's not an arguement.
So uhm.. what's that 4th param then??
Could you show us the blitz2d code, because then it would be easier for us to come up with blitzmax example that does the same.
DOH! Copy and paste error, I meant to say ReadBytes and WriteBytes that I'm converting in PeekByte, PokeByte. ReadBytes and WriteBytes have 4 params, as you say Peek and Poke Byte have 2 and 3.
I think it's all sorted now. Gah! Now I feel silly, feel free to give me a slap for being an idiot. :)
I deserve it.
No problem, I think we have all been there. Glad you figured it out.