Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Fatal Error question  (Read 8456 times)

0 Members and 1 Guest are viewing this topic.

SBOVIS

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
    • View Profile
    • LIMBO of the LOST
Fatal Error question
« on: April 09, 2007, 11:07:01 PM »

Hi,
   Ever since I have updated to 1.7.2 I keep getting these fatal error messages in my WME.script

EXAMPLE:
Fatal: Invalid instruction -557797922 ('scenes\scr\prisoncell\scene_init.script',line 100,IP:0x0)

When I look at this script and error line it refers to a line with a  break; at the end of it.

This never used to be an issue in previous versions of WME, does anyone know what this means?

Many thanks
Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Fatal Error question
« Reply #1 on: April 09, 2007, 11:25:01 PM »

Hi SVOBIS

It would really help if you can post the script that generates the error.
Logged
fl*p

SBOVIS

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
    • View Profile
    • LIMBO of the LOST
Re: Fatal Error question
« Reply #2 on: April 10, 2007, 12:02:10 AM »

Sorry here is the wme script



Code: [Select]
16:52: ********** DEBUG LOG OPENED 09-04-2007 (Release Build) *****************
16:52: Wintermute Engine ver 1.7.2, Compiled on Mar 11 2007, 17:17:43
16:52: Platform: Windows XP Service Pack 1 (Build 2600)
16:52: DirectX version: 9.0
16:52: BugslayerUtil.dll is bound
16:52:
16:52: Scanning packages...
16:52:   Registered 0 files in 0 package(s)
16:52: Initializing scripting engine...
16:52:   Script compiler 'dcscomp.dll' bound successfuly
16:52: Loading plugins...
16:52: Loading string table...
16:52:   23 strings loaded
16:52: Enumerating Direct3D devices...
16:52: Enumerating DirectSound devices...
16:52: Available video devices:
16:52:   NVIDIA GeForce 7800 GS (accelerated)
16:52:     nv4_disp.dll 6.14.10.9371
16:52: Available audio devices:
16:52:   Primary Sound Driver
16:52:   SB X-Fi Audio [DF20]
16:52:   Modem #0 Line Playback (emulated)
16:52:   SoundMAX Digital Audio
16:52:   [no sound]
16:52:
16:52: User selected:
16:52:   Video: NVIDIA GeForce 7800 GS (accelerated)
16:52:          Windowed:yes  Colors:32bit  T&L:no  Multisample:0
16:52:   Audio: Primary Sound Driver
16:52: Maximum texture size: 4096x4096
16:52: Engine initialized in 203 ms
16:52:
16:53: Fatal: Invalid instruction -557797922 ('scenes\scr\lev3r01\scene_init.script', line 110, IP:0x0)

16:54: Fatal: Invalid instruction -557797922 ('scenes\scr\lev3r02\scene_init.script', line 140, IP:0x0)

16:57: Fatal: Invalid instruction -557797922 ('scenes\scr\innofsinnbar\scene_init.script', line 123, IP:0x0)

17:01:
17:01: Shutting down...
17:01: Shutting down scripting engine
17:01: ********** DEBUG LOG CLOSED ********************************************

and here is one of the scripts that is effected -(scene_init fpr lev3r01)

Code: [Select]
#include "scripts\base.inc"
////////////////////////////////////////////////////////////////////////////////
// setup actor's initial position depending on where he came from
global winCompass;
global BORDER1;
global BORDER2;
BORDER1.Visible = true;
BORDER2.Visible = true;
global TOPBORDER;
global BOTTOMBORDER;
global TOPBORDER2;
global BOTTOMBORDER2;
TOPBORDER.Visible = false;
BOTTOMBORDER.Visible = false;
TOPBORDER2.Visible = false;
BOTTOMBORDER2.Visible = false;
var TB = TOPBORDER.GetImageObject();
var TB2 = TOPBORDER2.GetImageObject();
var BB = BOTTOMBORDER.GetImageObject();
var BB2 = BOTTOMBORDER2.GetImageObject();

winCompass.Visible = true;
var KNOCK = Scene.GetNode("KNOCK");
var MOVIE = Scene.GetNode("MOVIE");
var NPC = Scene.GetNode("NPC");
var NPCRUN = Scene.GetNode("NPCRUN");
var CONVERSATION = Scene.GetNode("CONVERSATION");
global NumVisitsLEV3R01;
if(NumVisitsLEV3R01==null) NumVisitsLEV3R01 = 0;
actor.Active = true;


if(Game.PrevScene=="lev3r02")
{
  actor.SkipTo(184, 346);
  actor.Direction = DI_DOWN;
}

if(Game.PrevScene=="DMMAP")
{
  actor.SkipTo(235, 346);
  actor.Direction = DI_DOWN;
}




// point the "camera" at the actor
Scene.SkipTo(actor);
  Game.Interactive = true;

//conversations
switch(NumVisitsLEV3R01)
{
  case 0:
Game.Interactive = false;
          winCompass.Visible = false;
       TOPBORDER.Visible = true;
       BOTTOMBORDER.Visible = true;
NPC.Active = true;
actor.SkipTo(872, 265);
  actor.Direction = DI_DOWN;
Sleep(1000);
actor.GoTo(472,350);
actor.TurnTo(DI_LEFT);
actor.TurnTo(DI_LEFT);
 
actor.SetFont("fonts/truetype2.font");
actor.TalkAsync("Ahhh.....at last I find you. Please take this from me I think they are from a friend of yours and he is very, very worried about you and I am a little bit worried myself about being worried about your friend who is worried about you and I am worried about this and I want you to take it so I will not be worried No more!");
CONVERSATION.PlayTheora("cutscenes\worrymiesterdm\npc001.ogg");
while (CONVERSATION.IsTheoraPlaying()) Sleep(1);

CONVERSATION.PlayAnim("vocal spacer.sprite");

Game.TakeItem("THREECOINS");
NPC.Active = false;
NPCRUN.Active = true;
Sleep (1000);

actor.SetFont("fonts/truetype.font");
actor.TalkAsync("Thank you , but who......");
CONVERSATION.PlayTheora("cutscenes\worrymiesterdm\briggs001.ogg");
while (CONVERSATION.IsTheoraPlaying()) Sleep(1);

CONVERSATION.PlayAnim("vocal spacer.sprite");

actor.StopTalking();
Sleep(2000);
NPCRUN.Active = true;
actor.GoTo(472,350);
actor.TurnTo(DI_DOWN);
actor.TurnTo(DI_DOWN);
actor.PlayAnim("actors\briggs\briggs noframe\dontknow\dontknow.sprite");
  actor.GoTo  (0,312);
 actor.TurnTo(DI_LEFT);
 actor.TurnTo(DI_LEFT);
Scene.FadeOut(400);
 TOPBORDER2.Visible = true;
       BOTTOMBORDER2.Visible = true;
       TOPBORDER.Visible = false;
       BOTTOMBORDER.Visible = false;     
   TOPBORDER2.Visible = false;
       BOTTOMBORDER2.Visible = false;
TB.Reset();
TB2.Reset();
BB.Reset();
BB2.Reset();
NPCRUN.Active = false;
NumVisitsLEV3R01 = NumVisitsLEV3R01 + 1;
Game.ChangeScene("scenes\lev3r02.scene");  break;       
 }

////////////////////////////////////////////////////////////////////////////////
// scene state
global Statelev3r01;

// default values
if(Statelev3r01==null) NumVisitsLEV3R01 = 1;
{
 Statelev3r01.Visited = false;
}


if(Statelev3r01.Visited==false)
{
 
    Statelev3r01.Visited = true;
  Game.Interactive = true;
  }



{
  Sleep(100); // wait for 100 milliseconds
}



as you can see at line 110 of this script is a break; which it does not seem to like, it does not show as an error on screen in debug mode though and does not seem to effect the game running.


Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Fatal Error question
« Reply #3 on: April 10, 2007, 08:02:08 AM »

this is well known unrepairable bug. It's caused by loops in the case statement.

Easy workaround is to make a function for the loop

function waitforvideo()
{
    while (CONVERSATION.IsTheoraPlaying()) Sleep(1);
}

and in the case replace whiles with

waitforvideo();
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

SBOVIS

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
    • View Profile
    • LIMBO of the LOST
Re: Fatal Error question
« Reply #4 on: April 10, 2007, 09:38:27 AM »

ok thanks,
               This function goes in my Game.Script? and then called in my scene_init scripts? or placed in each scene_init script


Thanks
Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS

SBOVIS

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
    • View Profile
    • LIMBO of the LOST
Re: Fatal Error question
« Reply #5 on: June 08, 2007, 01:00:56 PM »

This unrepairable bug issue, will it have any effect on the game when compiled and running?
Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Fatal Error question
« Reply #6 on: June 08, 2007, 04:13:47 PM »

Not if you fix it by removing the nested loops, as meta suggested.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.04 seconds with 21 queries.