Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Dionysius on April 25, 2008, 08:27:14 AM

Title: Can't find source of the bug
Post by: Dionysius on April 25, 2008, 08:27:14 AM
I have a bug in game_daemon.script:

When I press left mouse button on some interactive scene's entity and wait about 1-2 seconds, it writes in log

Quote
14:28:00:  Runtime error. Script 'scripts\game_daemon.script', line 47
14:28:00:    Call to undefined method 'ResetButtons'. Ignored.
14:28:00:  Runtime error. Script 'scripts\game_daemon.script', line 50
14:28:00:    Call to undefined method 'GetWidget'. Ignored.

This bug appears for the first time only. Then all is OK.

Line 47
Code: [Select]
WinMenu.ResetButtons();

Line 50
Code: [Select]
var Caption = WinMenu.GetWidget("caption");

What's wrong?
Title: Re: Can't find source of the bug
Post by: manarius on April 25, 2008, 09:50:48 AM
seems like winMenu does not point somewhere as far as i see it.

maybe try to Game.Msg(winMenu) and query type, name and so on :-)

and if you want better help pls post your complete game_loop.script.

cheers
Title: Re: Can't find source of the bug
Post by: Dionysius on April 25, 2008, 05:37:18 PM
I found the problem:

I deleted this code from game.script

Code: [Select]
// load the right-click menu
global WinMenu = Game.LoadWindow("interface\actions\actions.window");
WinMenu.Visible = false;

That is why game_daemon.script had this bug.

Excuse me for my hurry with starting this thread  :-[