Code in question:
chatbox(150,250,UPPER$(objects(1,find_array_obj(402)).name) + ": I am here to teach you about the market system...")
chatbox(150,250,UPPER$(objects(1,find_array_obj(402)).name) + ": First you will need some gold. I will give you 50 to start.")
gold = 50
if gold > 0 : set text to bold : ink 0,0 : set text size 22 : text 400,730,"Gold: " + str$(50) : endif
set text to normal : sync
chatbox(150,250,UPPER$(objects(1,find_array_obj(402)).name) + ": If you notice, you now have...")
chatbox(150,250,UPPER$(objects(1,find_array_obj(402)).name) + ": 50 gold at the bottom of your screen.")
chatbox() function:
paste image 128,x,y,100
ink 0,0 : set text to bold : set text size 14
center text x+190,y+60,chat$
center text x+190,y+100,"PRESS ANY KEY TO CONTINUE"
sync : wait key
variable
gold is globally declared as an integer.
Problem is the new "gold: 50" text will not appear on screen until I exit npc chat section and return to main game loop. Cannot figure out why. Probably something stupid and simple but I am stumped.