'DictionaryItem(coordinates, coordinate)': The given key was not present in the dictionary.

I have a script that changes the colours of the rooms, after a player changes objects. After changing the colours of the rooms(on a randomizer) correctly, it spits out several lines of
Error running script: Error evaluating expression 'DictionaryItem(coordinates, coordinate)': The given key was not present in the dictionary.
It says this 2 or 3 hundred times. I've tried to count, but more times than rooms I have, (and more times than four times the rooms I have, there being four possible colours).
One mistake it makes is it draws the central room the player is in and all the immediately connected rooms, but not the rooms those rooms connect to, as well. After that, it draws them as the exits are crossed into the rooms connecting to them. The original draw script drew all the boxes, so maybe it's a one time thing, a default, not a mistake, but if there are no mistakes, the error message is printing either way.

HELP!!!


Hmm… that seems odd. It looks like some function is trying to access grid coordinates without first checking if the room has been added to the map. This is most often seen when it comes to teleporting the player to a room that isn't on the map.

Are you changing the player object? I'm not sure how to go about initialising the new player object's coordinate dictionary in that case; because InitPOV doesn't seem to do it. The function ChangePOV seems to try to redraw the grid; but it looks like there might be a step missing in there.


Yes, ChangePOV is hiding the player grid or start grid, and the new grid is accurate. One of my scripts (don't ask me which one) is making it predraw rooms as soon as they are connected to the room the new player is in. One of my scripts (don't ask 2) is calling up an error message, but I don't know what the game isn't doing. It's doing everything I asked it to, at least.
I did use a game start script to call a function to predraw the map of all rooms, but the description says it only affects connected rooms. I tried to recall the function after changing players but it did not make the error stop, start, or change. I deleted that, but of course it's still the same error coming up.


Alright, I've fixed at least the part that was giving an errror message. My mistake was bringing the original character with me. So I switch early, leave that player upstairs, and travel exit free to another plane.
I cannot figure out what the Quest engine was thinking, as it should have just mapped out these other levels, and still maps out the central room and connecting rooms on floors other player characters work alone on, but did all the rooms connected or not on the first floor and left them fully visible on two floors that didn't include them.
Either way, I am not still getting an error message. I have found the script that erases the grid to redraw it, but I am just working with this draw-connected effect for now, because it is not useless or anything, just unexpected.


So, I am NOT still getting an error message!


Way to go Jennifer!


Thanks!


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums