Error GlobalScript line 116

Started by , Mon 29/03/2004 16:04:56

Previous topic - Next topic

Al Gore

When I move the mouse to the bottom of the screen the game quits with a message that reads:

(Global script line 116)
Error: SetGUIPosition: co-ordinates must lie in range (0,0) - (RMWID, RMHIT)

What the hell does that mean???

Ishmael

In the AGS editor, open the Script menu and choose "Global Script". Scroll the opening window down to line 116 (you see the number on it's left) and copy/paste some lines above and below it, including the specific line, in here so we can tell you what's the exact problem.

Basically, the error you're getting means that AGS is trying to place a GUI outside the screen, so there must be an invalid command in your 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.

Radiant

That's kind of interesting because you can, in fact, place GUIs partially or wholly off-screen.
My guess is that RMWID,RMHIT mean room width and room height, respectively. What kind of GUI are you using (modal, y-popup, persistant...) ?

Ishmael

I recall AGS reporting screen dimensions as the last two parameters to me... anyway, of cource, you can place GUIs outside of the screen, but the upper left coner of the GUI is used as the point where the GUI is placed, and that point cannot be outside of the screen, so SetGUIPosition(GUI, 20, -10); you'll get an error, but SetGUIPosition(GUI, 310, 199); don't, thus in both cases the GUI is partially outside of the screen (taking the game is lo-res).

(Not sure 'bout the latest updates, tho, might have been changed, but as far as I've read the changelogs, I haven't noticed)

The GUI type does not effect the matter I think.
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.

Radiant

I beg to differ.
In the last stable release (2.60) and subsequent betas, you can do SetGUIPosition (GUI, 20, -10) without trouble. For instance you can make a GUI slide onto the screen. Try it and see.

SSH

So, which version is (TOP) AL Gore using? Maybe he just needs to upgrade to solve his problem...
12

Alynn

Actually It wont allow me at all and I am using V2.60 SP1 and setting the gui position where y is greater than 239 it says you can't place the gui there...  But that is if your room is 239 pixels high.... if it is bigger you can theoreticly place it off screen... same works with X if the room is bigger than the viewport the scrolling can work fine....

I didn't bother to try smaller values, but for certain the GUI can NOT be place anywhere that is better than the rooms width and height...

Ishmael

Quote from: Radiant on Tue 30/03/2004 15:16:02
I beg to differ.
In the last stable release (2.60) and subsequent betas, you can do SetGUIPosition (GUI, 20, -10) without trouble. For instance you can make a GUI slide onto the screen. Try it and see.


Ok, so you then can't place GUIs under the bottom or on the right side of the right edge of the screen.
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.

SMF spam blocked by CleanTalk