Stormtrooper2001 wrote
Hello size is the size of my char it is fixed and does not change it is around 5 along x-axis and 15/2 along y-axis(x+size) and (y+size) give the coordinates of the point just below my character along the center .
i noticed the error i changed it to P=Memory.peek(16384+((Y+size)*32)+((x+size)/16) but it still shows the same error . What do I do?
You have a single variable called size. What is the value of that variable? I can't tell from your description. You say it is 5 along the x-axis and 15/2 along the y-axis (which is 7, since Jack doesn't support non-integers). So what is size? Is it 5 or is it 7 or what?
Let's assume it's 5.
So when Y=255 (not the 256 max value you previously stated) and x=511, what is the address of the memory location you are going to try to access?
Again, do... the... math!
P=Memory.peek(16384+((Y+size)*32)+((x+size)/16)
P=Memory.peek(16384+((255+5)*32)+((511+5)/16)
P=Memory.peek(16384+(260*32)+(516/16))
P=Memory.peek(16384+8320+32)
P=Memory.peek(24736)
Is this within the Heap/Screen memory space?