Can't get the Display("text"); function to work

Started by BockerAlex, Thu 12/06/2008 13:26:49

Previous topic - Next topic

BockerAlex

Well, I've encounter another problem, and as far as I can see, I'm doing it the exact same way the tutorial says, but it still wont work.

Anyway, I get an error when I try and interact (that is, look, talk to, use, pick up etc) with any of the hotspots.

The code I used for one of them is:

function hSand_Look()
{
  Display("Yellow sand. Nice and warm from the sun.");
  }

When I run the game, and try and look at the sand (hSand is the hotspot name), I get this message:

An error has occured...in "room1.asc", line 8
Error: Invalid GUI specified as text window.

EDIT: Oh, wait, do you have to create a GUI to be able for the game to recognise that you're switching what action you want the character to do? Because right now, the curser changes whenever the left mouse button/scroll wheel is used, and as all cursors have what action it is intending to do on it (i.e. the walk to cursor has the words 'walk to...' on it) I assumed that would work...

SSH

The problem is that you have set your general game options to display Dsiplay messages ona  GUI background that doesn't exist. Remove this setting and all will be fine.
12

GarageGothic

SSH beat me to it, but see below for elaboration:

Check the "General Settings" pane in the editor and scroll down to "Text output". Most likely the "Custom text-window GUI" is set to a value different than 0. What the error is telling you is that the GUI number you have set either doesn't exist, or it was created using the "New GUI" rather than "New Text Window GUI" option.

BockerAlex

#3
Looking for the text output thing, I noticed that the custom text-window was set at zero. o.o

EDIT: Solved
I hadn't put a GUI in. I have now, and it works. : D

SMF spam blocked by CleanTalk