[SOLVED] Cannot check "image number" of "closest instance of (sprite-type) to (sprite), error message comes out

I’m not sure why that’s giving an error but you can often get around those type mismatches by assigning the offending value to a variable and then using that variable to complete the sequence of blocks, like this: