While pico8-lua itself can handle even 0x7fff arguments being passed to a function (easy to see via unpack, for example), peek and poke seem to only handle up to 0x2000.
E.g. peek(0x8000, 0x2001) returns 0x2000 values instead of 0x2001
And poke(0x8000, <0x2001 values>) only pokes addresses up to 0x9fff
One more bug: if you pass 0 to the 3rd ("count") argument of ord(), you get a "too many ord results" error (whereas no return values would've been expected)
This makes it awkward to convert any string to its characters via ord(str,1,#str) since it fails if str is empty.
@merwok Wow! I use multi-poke extensively in my last cart, but that was the only one I was aware of! I refer to the manual and wiki constantly, but I think I'm due for a full readthrough of the manual again, I see these are all documented now!
[Please log in to post a comment]