I can see what's wrong though - you're trying to insert that as an ASM file, aren't you? Looks like that block is meant to be assembled with TRASM and inserted as a BIN file.
Either way, here's the proper format - haven't tested it though.
Code
JMP M : JMP M : JMP M : JMP R : JMP R : JMP R : JMP R !TELEITEM = $80 ;The sprite number. Change it to any >>>carryable<<< sprite to teleport with that sprite M: PHX PHY PHA LDX #$00 Loop: LDA $9E,x CMP #!TELEITEM BNE NoMatch LDA $14C8,x CMP #$0B BNE NoMatch BRA Teleport NoMatch: INX CPX #$0C BEQ Return BRA Loop Teleport: SEP #$30 LDA #$06 STA $71 STZ $89 STZ $88 Return: PLA PLY PLX R: RTL