Error messages(scriptin problem) [SOLVED]

Started by guybrush, Sat 23/07/2005 19:00:42

Previous topic - Next topic

guybrush

Hi! I don't know what's wrong, I did a little scripting, then, when I Test the Game, game loads and then i get this error message:

I really don't know what's the problem. Usually i get these kind of error messages before the game loads. It looks like it's the problem just in this one room. If i will have to, I'll post the script here, so you can see what's wrong. Thank you.
SPY FUNCTION-- My first game
C O M I N G   S O O N !

Ishmael

Mm... I interpret that message as that you have a Run Script interaction even in the room interactions, but there is no corresponding function to that script, or it is corrupted in some way, for that run script command. I suggest you post the room script, and a snapshot or laydown of your interaction editor view for the room...
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

guybrush

#2
OK!

You see there are a lots of functions there. At first, I've put it all in just one "Run Script" fuction, but then i got the same error message as now. I though it will change something if I just do it like this, but it all stayed the same. In "Run Script", there is only "setbackgroundframe".

Here's the script:

/ room script file


#sectionstart hotspot1_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function hotspot1_a() {
Ã,  // script for Hotspot 1 (Bathroom mat): Interact hotspot
cMark.ChangeView(19); // or whatever the view's name is
Ã,  cMark.SpeechView = 19 ; // so you don't have to do it in the dialog script
Ã,  RunDialog(2); // start the dialog

Ã, 
}
#sectionend hotspot1_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE

#sectionstart hotspot1_bÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function hotspot1_b() {
Ã,  // script for Hotspot 1 (Bathroom mat): Interact hotspot
// this code will be executed after the dialog ends:
Ã,  cMark.ChangeView(1);
Ã,  cMark.SpeechView = 2;Ã, 
}
#sectionend hotspot1_bÃ,  // DO NOT EDIT OR REMOVE THIS LINE



#sectionstart room_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE
Ã,  // script for Room: Player enters screen (before fadein)
#sectionend room_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE



#sectionstart hotspot9_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function hotspot9_a() {
Ã,  // script for Hotspot 9 (Keyhole): Use inventory on hotspot
SetBackgroundFrame(1);
WaitKey(100);Ã, 
}
#sectionend hotspot9_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE

#sectionstart hotspot9_bÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function hotspot9_b() {
Ã,  // script for Hotspot 9 (Keyhole): Use inventory on hotspot
SetBackgroundFrame(0);
}
#sectionend hotspot9_bÃ,  // DO NOT EDIT OR REMOVE THIS LINE

#sectionstart hotspot5_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function hotspot5_a() {
Ã,  // script for Hotspot 5 (Beam of light): Use inventory on hotspot
SetBackgroundFrame(2);Ã, 
}
#sectionend hotspot5_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE

#sectionstart hotspot5_bÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function hotspot5_b() {
Ã,  // script for Hotspot 5 (Beam of light): Use inventory on hotspot
Wait(156);Ã, 
}
#sectionend hotspot5_bÃ,  // DO NOT EDIT OR REMOVE THIS LINE

I doubt that will help.
SPY FUNCTION-- My first game
C O M I N G   S O O N !

Ishmael

Actually I meant room interactions, not hotspot. As the error refers to failure running a room function, but it doesn't appear in the room script.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

guybrush

Oh, OK:

I think I know what's the problem; when i dobleclick on the "Run Script" Fuction above, I get this:

WHAT!!??
SPY FUNCTION-- My first game
C O M I N G   S O O N !

Ishmael

Delete the Run Script command and re-add it, see what happens.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

guybrush

Yeah, i tought about that. And it worked. Thank you!
SPY FUNCTION-- My first game
C O M I N G   S O O N !

strazer

The problem was probably this:

Code: ags

#sectionstart room_a  // DO NOT EDIT OR REMOVE THIS LINE
  // script for Room: Player enters screen (before fadein)
#sectionend room_a  // DO NOT EDIT OR REMOVE THIS LINE


As you see the function header
  function room_a() {
and the closing
  }
are missing. You probably accidently deleted it.

To remove a room function, always delete the corresponding "Run script" action in the interaction editor instead of just deleting the code from the room script. Otherwise the "Run script" action is linked to a non-existing function which can lead to these kind of problems.

TerranRich

Glad it worked. Also, keep in mind that Error message reports go in the main Technical Forum. Thank you.
Status: Trying to come up with some ideas...

SMF spam blocked by CleanTalk