Global Script Error: 44

Started by zerocell, Wed 08/02/2006 21:14:29

Previous topic - Next topic

zerocell

I got a message saying " Global Script Error: 44"

WTF? >:( ???

I read and read the tutorial, even did exactly what it said, and it still gave me the same message.
Would you mind helping me?

thx.

strazer

#1
Please post the entire error message.
44 probably refers to the script line in your global script that causes the error. So go in there (menu "Script" -> "Edit global script...") and post some of your code in a reply here that has to do with, and around line 44.

zerocell

the message said, "Global Script Error: message 44"

I've tried changing it, but I don't cant figure it out.

It is coming up every time I try to interact with a hotspot.

Game: display message

I add my message, and it kicks me out and gives me that error.... ???

Scummbuddy

#3
Edit* See Strazers post below

no, we understand what the error message says, but we need to see the room script.

when you have the problem room loaded, in the ags editor, press Ctrl+E, and a new window should pop up. This is the room script. Select all and copy and then paste it all here in a reply.

Edit* You know, as I was posting this, I was thinking to myself that it was a global script problem, but for some reason, I looked up how to find the room script.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

strazer

Scummbuddy, he wrote "Global Script Error: message 44".

zerocell, do as I said and post the script around line 44 from the global script here.

zerocell

in Global Script (line 44)

Error: DisplayMessage: Invalid message number to display


SCRIPT CODE

LINE 36#sectionstart on_mouse_click  // DO NOT EDIT OR REMOVE THIS LINE
function on_mouse_click(MouseButton button) // called when a mouse button is clicked. button is either LEFT or RIGHT
  {
  if (IsGamePaused() == 1) // Game is paused, so do nothing (ie. don't allow mouse click)
    {
    }
  else if (button == eMouseLeft)
    {
LINE 44    ProcessClick(mouse.x,mouse.y, mouse.Mode);
    }
  else // right-click, so cycle cursor
    {   
    mouse.SelectNextMode();
    }
  }
LINE 56#sectionend on_mouse_click  // DO NOT EDIT OR REMOVE THIS LINE
That's everything, Error Message, and Script. Hope you can help.

strazer

ProcessClick is a function that calls other functions, the mouse click event of a hotspot, for example. So the faulty script is actually there in the mouse click event of the hotspot you clicked.

What do you do when this message appears? Looking at a hotspot? Interacting with an object? We need the script or interaction editor action from that event.

Quote
in Global Script (line 44)

Error: DisplayMessage: Invalid message number to display

So just as the message states, you're probably just using the wrong message number.
Remember, messages 0-499 are room messages and they belong only to the room you define them for. If you go to another room, these messages are not available anymore, hence the error message.
If you want to display a message regardless of what room you're in, use global messages (500-999 I think, check manual).

zerocell

So then, what exactly do I do to fix the script? I was trying to have my character LOOK AT the hotspot, and then it boots me.

I havent given the hotspot any kind of "number" from the room, or global.


Ashen

Quote from: strazerWhat do you do when this message appears? Looking at a hotspot? Interacting with an object? We need the script or interaction editor action from that event.

Before we can tell you what to do to fix it, we need to know exactly what you've got under the 'Look at hotspot' interaction that causes the crash.
I know what you're thinking ... Don't think that.

zerocell

how do you mean?

I sent the script... where else do you want me to look?

Ashen

#10
You've posted the global script, around the line that causes the error - now you need to post the script, or Interaction Editor commands, attached to the hotspot itself - the one that you click on to cause the crash - which will be in the Room Script. If you're using Interaction Editor commands - which is likely, if you're just following the tutorial - you'll need to tell us which ones. They'll be on the window that looks something like the one in the 'Interactions' section of Lesson 3 of the tutorial.

If you've got a 'Game - Display a message' command (as shown in the tutorial, and which seems likely given the error message), you should also tell us what message number you've set, and the text of that message. If you haven't CREATED that message yet, do so - that'll be what the problem was.

To clarify (I hope):
Line 44 of the global script (as you posted it) just says 'Run the interaction for the current Cursor mode (i.e. Look at)'. This means the problem is actually in whatever should be running when you look at the hotspot. If you've just followed the tutorial and done nothing else, this should be a 'Game - Display a message' command. This also fits with the 'Invalid message number to display' part of the error message. The most likely cause of this is either you haven't made any messages to be displayed (as explained in the tutorial), or you've accidentally changed the message number to one that doesn't exist.
I know what you're thinking ... Don't think that.

zerocell

ah, see, that explains a little.

I think what I need to do, is create a message under the Room or global area, then assign the specific number to that hotspot, yeah? Would that work?

Ashen

Yes, it'll work. In fact - if you're following the tutorial in the manual, it's what you should ALREADY have done.

Just remember, you create the message either through the Interaction Editor, or the 'Edit Messages' button on the main Room Editor window - don't try to make them in the Room Script. Until you're more comfortable with the basics, you don't really need worry about the Room or Global Scripts at all.
I know what you're thinking ... Don't think that.

zerocell


SMF spam blocked by CleanTalk