script problem?

Started by Gepard, Mon 10/11/2008 18:18:55

Previous topic - Next topic

Gepard

I created a room and added some hotspots. That was yesterday. Today, when I wanted to edit those hotspots (some scripts added to them), this came up:

---------------------------
AGS Editor Error
---------------------------
An attempt was made to edit a script function '#sectionstart hotspot3_c ' that does not exist. Ensure you have not manually deleted any automatically-created script functions.

And I dont have to say, that I did nothing. I also tried to create a new script function for those hotspots, but that doesnt work either. I mean I can add some function, but not script function. Scripts in the other rooms works just fine.

When I run game, it crashes and this comes up:

---------------------------
Adventure Game Studio
---------------------------
An internal error has occured. Please note down the following information.
If the problem persists, contact Chris Jones.
(ACI version 2.72.920)

Error: prepare_script: error -18 (no such function in script) trying to run 'hotspot6_a'   (Room 26)

Anyone please help me? I spend months on this game.

Thx!
Drink up me 'arties! Yo ho!

paolo

#1
Gepard,

Try opening the room script directly from the "Rooms" menu. It looks like you might have accidentally deleted the lines it is complaining about. Can you find them in the file (using F3)? If they are missing, you can type them back in.

Just for the record, your script should look like this:

Code: ags

#sectionstart hotspot3_c  // DO NOT EDIT OR REMOVE THIS LINE
function hotspot3_c()
{
  //your code here
}
#sectionend hotspot3_c  // DO NOT EDIT OR REMOVE THIS LINE


and similarly for the other code it is complaining about.

Dualnames

I get those kind of errors, when I've done something like: You have declared a function for the sixth hotspot, but you've erased the code..? I have to see it, I'll kill it in no time. But I'm far from help this way.


EDIT: I'm talking about seeing the game via AGS editor not the code script.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

SMF spam blocked by CleanTalk