GetGameParameter: invalid loop specified

Started by BrainMayhem, Fri 20/10/2017 19:42:41

Previous topic - Next topic

BrainMayhem

Hi everyone,

I'm using monkey_05_06's Flashlight module and this specific problem keeps happening:

With the flashlight active, I go from room to room without a problem. But there's a particular room (that happens to be exactly like the others (it has hotspots, objects, nothing out of the ordinary)) that keeps crashing the game and giving me the following error:



It points to this line:
Code: ags

    ViewFrame *frame = Game.GetViewFrame(this.FollowingCharacter.View, this.FollowingCharacter.Loop, this.FollowingCharacter.Frame);


I've made sure the flashlight is following the player and I'm calling the update on the problematic room and the ones adjacent to it, but the result doesn't change.

//global script @ game_start
Code: ags
Flashlight.SetFollowCharacter(player);


//room script @ room_Load
Code: ags
Flashlight.Update();


Already tried to delete and recreate the room, but still...nothing happens.

Has anyone have any idea on what's happening? ???

BrainMayhem

Turns out the error was somewhere else: accidentally typed "eDirectionDownRight" when changing rooms, but I don't have diagonals. Fixed to "eDirectionRight" and everything works (nod)

Khris

I guess AGS shouldn't set a character's .Loop to an empty one; or Game.GetViewFrame should fall back to null.

Crimson Wizard

Quote from: Khris on Sat 21/10/2017 14:01:21
I guess AGS shouldn't set a character's .Loop to an empty one;
The rules for this changed over time. When I was helping restore compatibility with pre-3.0 games, I found that earlier versions of AGS actually did fallback to another loop, but that was changed later for some reason.

SMF spam blocked by CleanTalk