Intro and gui script problems

Started by mousemat, Mon 30/08/2004 08:30:58

Previous topic - Next topic

mousemat

i have this intro script but every time i save it and test the game it says
parse error unexpected display message     does anyone know how to fix this

DisplayMesssage("Whats that noise");
Playmusic(1);
DisplayMessage("There it was again");
DisplayMessage ("Woooooooooo");
FadeOut(20);
Wait(10);
ObjectOn(1);
FadeIn(20);
Wait(30);
NewRoomEx(1, 0, 0);






Oh yer moon walkin'
www.freewebs.com/bkreview/

Ishmael

You most likely got the script in the wrong place... where did you put it?

And I'd fix the line:

DisplayMessage ("Woooooooooo"

It seems to be missing the end...
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.

mousemat

i put it in room interactions for the intro room.
Oh yer moon walkin'
www.freewebs.com/bkreview/

Ishmael

#3
By any chance, could you post the whole room 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.

mousemat

#4
this is the whole room script :-\
Oh yer moon walkin'
www.freewebs.com/bkreview/

Ishmael

In that case you go the whole thing wrong... you should go to the Room Interactions -> Player enters screen (after fadein) -> run script -> edit script and enter that there...

And scummy, what was wrong with my post? I reckon I typoed something, but what to need that fixin? ----- EDIT: oh, "hole"? heh.........  ;D -----
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.

Scummbuddy

you wrote 'change' not 'chance' and then i added the comma... i dunno, i just got off a 10 hour shift, and for some reason, i decided to tidy up this thread, and only this thread. dont mind me.  ::)
- 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

mousemat

thanks ishmael i thought something wrong but it still dosent solve my problem
Oh yer moon walkin'
www.freewebs.com/bkreview/

Mr Jake

Make sure you put it in After fadeing, not Before

mousemat

now it says undifined token "DisplayMessage"
Oh yer moon walkin'
www.freewebs.com/bkreview/

dreammaster

This may not answer your question, but as far as I'm aware, DisplayMessage only accepts a mesage number parameter, doesn't it? If you want to pass a string directly for display, don't you need to use the "Display" function?

Mr Jake

erm, its because you have 'DisplayMesssage' not 'DisplayMessage' on the first line (just noticed when I copyed the script into AGS to try myself)

mousemat

thanks hotspot its working now ..the only problem now is an unexpected { in my gui script  (first line)

function interface_click(int interface, int button)
  if (interface == ICONBAR) {
    if (button == 4) {  // show inventory
      show_inventory_window();
    }
    else if (button == 5) {   // use selected inventory
      if (character[ GetPlayerCharacter() ].activeinv >= 0)
        SetCursorMode(4);
    }
    else if (button == 6)    // save game
      SaveGameDialog();
    else if (button == 7)   // load game
      RestoreGameDialog();
    else if (button == 8)   // quit
      QuitGame(1);
    else if (button == 9)    // about
      Display("Adventure Game Studio v2 run-time engine[[Copyright (c) 1999-2003 Chris Jones");
  }  // end if interface ICONBAR

  if (interface == INVENTORY) {
    // They clicked a button on the Inventory GUI
   
    if (button == 1) {
      // They pressed SELECT, so switch to the Get cursor
      SetCursorMode (MODE_USE);
      // But, override the appearance to look like the arrow
      SetMouseCursor (6);
    }
   
    if (button == 2) {
      // They pressed LOOK, so switch to that mode
      SetActiveInventory(-1);
      SetCursorMode(MODE_LOOK); 
    }
    if (button == 3) {
      // They pressed the OK button, close the GUI
      GUIOff (INVENTORY);
      SetDefaultCursor();
    }

    if ((button == 4) && (game.top_inv_item < game.num_inv_items - game.num_inv_displayed)) {
      // scroll down
      game.top_inv_item = game.top_inv_item + game.items_per_line;
    }
    if ((button == 5) && (game.top_inv_item > 0)){
      // scroll up
      game.top_inv_item = game.top_inv_item - game.items_per_line;
    }
  }
  }
Oh yer moon walkin'
www.freewebs.com/bkreview/

Mr Jake

I think you need to put another '{' directly under (or at the end of) 'function interface_click(int interface, int button) '

mousemat

if you mean like this then it dosnt work

function interface_click(int interface, int button)
{
  if (interface == ICONBAR) {
Oh yer moon walkin'
www.freewebs.com/bkreview/

mousemat

aw....it has worked on another game i made though (apart from the inventory) do you think you could fix it up a bit.

Edit :were did your post go hotspot
Oh yer moon walkin'
www.freewebs.com/bkreview/

Mr Jake

erm, about that, MM didnt double post on purpose I removed my message as he was replying, I cant really test the script myself and fix it because I would need to make all the GUIs

mousemat

i am so fed up with scripting...(by the way somone made this script and the guis for me)
Oh yer moon walkin'
www.freewebs.com/bkreview/

mousemat

#18
ok new problem ...when i open the inventory screen displays an error it says 1 or more of the inventory grafix may have been deleted
here is my script

if (interface == ICONBAR) {
    if (button == 4) {  // show inventory
      show_inventory_window();
    }
    else if (button == 5) {   // use selected inventory
      if (character[ GetPlayerCharacter() ].activeinv >= 0)
        SetCursorMode(4);

space here for gui stuff


if (button == 2) {
      // They pressed LOOK, so switch to that mode
      SetActiveInventory(-1);
      SetCursorMode(MODE_LOOK); 
    }
    if (button == 3) {
      // They pressed the OK button, close the GUI
      GUIOff (INVENTORY);
      SetDefaultCursor();
    }

    if ((button == 4) && (game.top_inv_item < game.num_inv_items - game.num_inv_displayed)) {
      // scroll down
      game.top_inv_item = game.top_inv_item + game.items_per_line;
    }
    if ((button == 5) && (game.top_inv_item > 0)){
      // scroll up
      game.top_inv_item = game.top_inv_item - game.items_per_line;
    }
  }
please help
Oh yer moon walkin'
www.freewebs.com/bkreview/

Albert Cuandero

Quote1 or more of the inventory grafix may have been deleted

Make sure that if you started from the "default" and the "empty" game, you only import your sprites over the old ones. Deleting those gave the same message the first time I started playing around with AGS (thus I started from an empty game).
int do_you_like_me;
if (do_you_like_me == 1) Display ("You can call me Al");
else {}

SMF spam blocked by CleanTalk