Room_RepExec Error [solved]

Started by arj0n, Tue 03/11/2009 22:06:50

Previous topic - Next topic

arj0n

I removed this rep_exec function from the room script because the game was running abnormally slow
(which didn't solve the slow running problem anyway but whatever):

function room_RepExec()
{
}
function repeatedly_execute_always()

{
 if (!cBird.Moving)
 {
   if (cBird.x == 190)
   {
     cBird.Walk(400,  163, eNoBlock, eAnywhere);      
   }
   else
   {
     cBird.Walk(190,  163, eNoBlock, eAnywhere);
   }
 }
 if (!cKeen.Moving)
 {
  if (cKeen.x == 190)
  {
    cKeen.Walk(400,  190, eNoBlock, eAnywhere);
  }
  else
  {
    cKeen.Walk(190,  190, eNoBlock, eAnywhere);
  }
 }
}

Then I tried to run the game but this error occurs:

Error: prepare-script: error -18 (no such funtion in script) trying to run 'room_RepExec' (Room 1)

Can't figure out why this happens... ???
Anyone?

skuttleman

It's probably because you have the room event for "Repeatedly execute" set to room_RepExec, but when AGS compiles your game, it can't find the script since you deleted it. Removing room_RepExec from the room's event list should solve that.

arj0n

Stupid me, I should have know that. :-X
Thanx Skuttleman :)

SMF spam blocked by CleanTalk