I mean, that's the whole chunk. Could it be an issue with positioning or where I've put it? I tried putting it in the scenes script, I tried putting it in the game's main script as well, near the beginning where everything else is defined but with the appropriate spacing and indentations, and in both cases it returned the same error. Everything works perfectly without that code snippet, so either it's wrong or it's interacting with something wrong. Where should I be putting it, ideally?
UPDATE: I answered my own question by moving the script down a few chunks and now no more errors! The map pops up at the appropriate time... Except my hotspots aren't working. At first they were half working but in the wrong places (in a big lump in the middle), so I changed the coordinates (nothing else), and now nothing at all responds, even though I'm positive that they're correct. I tried (Upper Left xpos, UL ypos, Lower Right xpos, LR ypos) AND (UL xpos, UL ypos, width, height) since different help/forum answers say different things, all relative to my 800x600 window, but nothing reacts? Once again I'm sure I'm making another silly mistake. D: Here's the code as it stands now:
Code: Select all
# The game starts here.
screen i_map:
imagemap:
auto "imagemap_%s.jpg"
hotspot (150,140,224,34) action Return("store_m")
hotspot (325,275,132,34) action Return("square_m")
hotspot (175,340,200,34) action Return("inn_m")
hotspot (540,340,177,34) action Return("castle_m")
And then:
Code: Select all
label imap:
window hide None
call screen i_map
window show None
if _return == "store_m":
m "You chose the store."
elif _return == "square_m":
m "You chose the square."
elif _return == "inn_m":
m "You chose the inn."
elif _return == "castle_m":
m "You chose the castle."
Update again: Solved everything thanks to the code snippet
in this post.