Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Thu 15/01/2004 10:11:42

Title: error-couldn't find in any help files etc. To do with dissplaying a message.
Post by: on Thu 15/01/2004 10:11:42
Hey i got this error when trying to look at a poster in my game. When you look at it was supposed to show a message. I lloked in the hepl files and FAQ but couldn't find it:(

The error read as below:

An error has occured. Please contact the game author for support, as this probelm is casued by the game insted of the interpreter.
(ACI version 2.60.693)

(Global script line 50)
Error:DisplayMessage: Invalid message number.

now i followed the tutorial word for word, in the section under "hotspots and intereactions" yet still ogt this error.

Can anyone help?

Thanks,
Gandhi

Title: Re:error-couldn't find in any help files etc. To do with dissplaying a message.
Post by: Darth Mandarb on Thu 15/01/2004 10:26:16
Keep in mind that if it's the only message you're trying to access it'll be message 0 (not 1) in the list!

You could just make the 'Player Looks at Hotspot' action a 'Run Script' and then put (in the script):

Display("You look at the poster of so-and-so")

(or whatever you actually want it to say)

That should work too.

])]V[
Title: Re:error-couldn't find in any help files etc. To do with dissplaying a message.
Post by: Ishmael on Thu 15/01/2004 11:14:16
Have you typed in:
DisplayMessage("It's a poster...");
?

Because the parameter DisplayMessage takes is an integer, it takes a number, which is either a room message (message numbers 1-499, I think), which you can edit in the room's messages editor, pressing the "abc" button in the room settings, or a global message (numbers 500-999), which can be edited at the global messages pane of the main AGS editor.

Use the Display(); command DM mentioned to display text without using the global/room messages.