AGS Error the Program suggested I Post

Started by Cordate, Sat 02/05/2020 16:22:48

Previous topic - Next topic

Cordate

I tried changing a the starting room for a character after changing it's name, and the program gave me this error, and said AGS doesn't know how to deal with it, and to post is here:

Code: aga

Error: Object reference not set to an instance of an object.
Version: AGS 3.5.0.23

System.NullReferenceException: Object reference not set to an instance of an object.
   at AGS.Editor.CharactersEditorFilter.MoveCharacter(Int32 newX, Int32 newY)
   at AGS.Editor.CharactersEditorFilter.MouseMove(Int32 x, Int32 y, RoomEditorState state)
   at AGS.Editor.RoomSettingsEditor.bufferedPanel1_MouseMove(Object sender, MouseEventArgs e)
   at System.Windows.Forms.Control.OnMouseMove(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseMove(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Crimson Wizard

Were you moving character around the room when this happened?

pell

You're not using the latest version of AGS (3.5.0.24) unless the error message is displaying the wrong number.

I tried reproducing the bug in the latest AGS, both by changing the script name and starting room of the player character and a secondary character, but it worked fine.

I wonder if you have a reference to the old name in one of your room scripts that the compiler didn't catch when you rebuilt the game. I forgot to change cEgo.ChangeRoom cNewName.ChangeRoom in two of my scripts, but the compiler caught it. Maybe there are parts of the scripts that the compiler can't debug as well.

Crimson Wizard

Quote from: pell on Tue 05/05/2020 08:53:58
I wonder if you have a reference to the old name in one of your room scripts that the compiler didn't catch when you rebuilt the game. I forgot to change cEgo.ChangeRoom cNewName.ChangeRoom in two of my scripts, but the compiler caught it. Maybe there are parts of the scripts that the compiler can't debug as well.

Note that the above is not a script error, but a room editor exception, the callstack showing CharactersEditorFilter.MoveCharacter, which is when user moves character around the room in the editor.

pell

#4
Quote from: Crimson Wizard on Tue 05/05/2020 09:10:53
Quote from: pell on Tue 05/05/2020 08:53:58
I wonder if you have a reference to the old name in one of your room scripts that the compiler didn't catch when you rebuilt the game. I forgot to change cEgo.ChangeRoom cNewName.ChangeRoom in two of my scripts, but the compiler caught it. Maybe there are parts of the scripts that the compiler can't debug as well.

Note that the above is not a script error, but a room editor exception, the callstack showing CharactersEditorFilter.MoveCharacter, which is when user moves character around the room in the editor.

Does it matter whether that's the player character or another character? Because after changing the player character's script name and it's starting room, I had no problems even when I moved the character around and walked into another room. I wonder if you're talking about changing the character's starting room with a script rather than with the editor's character settings (although, I'm not sure that even makes sense. The starting room for the game is the starting room.)

Crimson Wizard

Quote from: pell on Tue 05/05/2020 09:16:18
Does it matter whether that's the player character or another character? Because after changing the player character's script name and it's starting room, I had no problems even when I moved the character around and walked into another room.

I mean, this error happens not in game, but in editor. By "moving character", I mean dragging character around the room editor, not walking in game.

Changing character's room in script does not apply to this, as script is only executed at runtime.

pell

Quote from: Crimson Wizard on Tue 05/05/2020 10:27:55
Quote from: pell on Tue 05/05/2020 09:16:18
Does it matter whether that's the player character or another character? Because after changing the player character's script name and it's starting room, I had no problems even when I moved the character around and walked into another room.

I mean, this error happens not in game, but in editor. By "moving character", I mean dragging character around the room editor, not walking in game.

Changing character's room in script does not apply to this, as script is only executed at runtime.

Ah, OK. I was assuming Cordate's error message was thrown by the engine running the game. Now that I look at it again, I see it was probably thrown by the editor.

SMF spam blocked by CleanTalk