Here's a pokemart script that has no bugs in or out of the pokemart.
#dynamic 0x800000
#org @start
special 0x187
compare LASTRESULT 0x2
if 0x1 goto @no
lock
faceplayer
preparemsg @ talk1
waitmsg
pokemart @inventory
msgbox @talk2
release
end
#org @no
release
end
#org @talk1
=Hi there/n may I help you
#org @ talk2
=please come again
' MartItems
#org @iventory
raw word 0x4
raw word 0x0
The script must end with 0x0 for fire red
#dynamic 0x800000
#org @start
special 0x187
compare LASTRESULT 0x2
if 0x1 goto @no
lock
faceplayer
preparemsg @ talk1
waitmsg
pokemart @inventory
msgbox @talk2
release
end
#org @no
release
end
#org @talk1
=Hi there/n may I help you
#org @ talk2
=please come again
' MartItems
#org @iventory
raw word 0x4
raw word 0x0
The script must end with 0x0 for fire red