Error in travelling between rooms

fuzzybunny2203
28 Nov 2017, 21:06

Ok, so I’ve set up a teleportation hub in my game, the player simply steps on it and chooses between three different locations and I’ve set up my script to send the player there.
It works fine, it plays out the script perfectly which is weird because whenever you ‘teleport’ it comes up with this error message:
You will now skip ahead and choose your district to start the story.
Error running script: Error evaluating expression 'DictionaryItem(coordinates, coordinate)': The given key was not present in the dictionary.
Error running script: Error evaluating expression 'DictionaryItem(coordinates, coordinate)': The given key was not present in the dictionary.
Error running script: Error evaluating expression 'DictionaryItem(coordinates, coordinate)': The given key was not present in the dictionary.

I don’t know what I did wrong :p
Does this mean I have to create a new dictionary? If it does, I’m not quite sure what to put in as it works fine already... Keep in mind I am using the online editor.


mrangel
28 Nov 2017, 21:25

Can you show us the script? It's hard to know what's causing the error just from that.

Though I suspect that the error message appearing multiple times means it's coming from within a function.


jmnevil54
28 Nov 2017, 22:16

I have had the error myself.

It happens whenever you use a "move player to" script, instead of a standard "exit" script. Apparently it messes with the coordinates or something, when reading the error.

The only way I know how to fix it is to 1. Turn off the map, or 2. make an actual exit instead of uses a function/command.


mrangel
28 Nov 2017, 23:12

Oh, you're using the gridmap?

When you enter a new room, the map uses the exit between the current and previous rooms to work out where on the map the new room should be displayed. If there's no such exit, you need to set the coordinates manually before moving the player.

Can't remember the names of the variables off the top of my head, but I'm sure there's a tutorial around somewhere.


fuzzybunny2203
28 Nov 2017, 23:44

Thank you, jmnevil54!!! I turned off the map and now the error message is gone :)


The Pixie
29 Nov 2017, 09:53

The issue with teleporting when using the map is discussed here:
http://docs.textadventures.co.uk/quest/showing_a_map.html