Thanks! Taking a look...
npc-751 and npc-752 define their palace switch colors as "white" and "dark", two colours not natively included in SMBX2. That's fine! That's intended to be possible. There's just a bit of setup missing in this situation, that's causing your error.
I noticed these NPCs come from the SMB2 expanded pack. So I took a look and found the missing files:

This folder "particles" from where you got the switch blocks needs to go into your level folder as well. It contains the images for the particle burst when hitting the switch palace switch. Their absence is causing the error.
If there is another error that shows up after fixing this one by copying the particles folder over, make sure to share the new error as well.