Help with roguelike game.

It is probably that there is a () where there shouldn't be one, or there is not a () where there should be one.

I will do some more testing today and let you know where the error is.

Andar, that is the list of rooms from which one will be chosen at random. The choosing at random is in the common event.

Edit: I see what it is - I forgot to add a second argument to the splice command. Change that line to this:

Control Variables [002: Next Room] = Script: $gameVariables.value(1).splice(Math.randomInt($gameVariables.value(1).length), 1)Thanks for the screenshot of the debug window - that made it very obvious what the problem was (variable 2 should only have one number, so it made it clear that the splice was picking up too many)
Sorry, I didnt saw your edit. I still get the same error  (Undefined is not a function) >.< 
Hey, sorry to necro this thread but I'm trying to do something similar, albeit in a more (hopefully) simple way. Rooms are chosen at random on a dice roll from 1 - 15. I've made it consistent with directional travel by scripting Northbound, Southbound, Eastbound and Westbound events individually.

What I'm struggling with however, is returning to the previous room/last room visited. I'm not sure what the best way to do it is and it's beginning to cause me physical pain lol
Hey, sorry to necro this thread but I'm trying to do something similar, albeit in a more (hopefully) simple way. Rooms are chosen at random on a dice roll from 1 - 15. I've made it consistent with directional travel by scripting Northbound, Southbound, Eastbound and Westbound events individually.

What I'm struggling with however, is returning to the previous room/last room visited. I'm not sure what the best way to do it is and it's beginning to cause me physical pain lol
Well it's been a while since I've used RPG Maker, but if I'm remembering correctly, your problem should be as simple as making a variable to hold the value of which ever room you just came from, then you can recall that variable to go back.

If you're trying to do that for every floor/room, you could set set aside a variable for each room to record the room you came to it from. Hope I was able to help some.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-roguelike-game.52216/