I am trying to make a full throttle style control GUI

Started by Melee Island Resident, Thu 16/06/2011 22:03:01

Previous topic - Next topic

Melee Island Resident

on this line a get an error message

if (mouse.IsButtonDown (eMouseLeft)  gIconbar.Visible = true == 0)

GlobalScript.asc(74): Error (line 74): Parse error in expr near 'gIconbar'

could someone please explain to me what is wrong with this in a way that a four year old could understand?
it's just I'm having a really hard time when I get error messages like these

barefoot

Do you want the gIconBar to be visible when mouse button down?

I think the last bit in your code is wrong

gIconbar.Visible = true == 0  (doesn't make sense)





I May Not Be Perfect but I Have A Big Heart ..

Matti

You forgot a parenthesis and I don't know what the end of your line is supposed to do:

if (mouse.IsButtonDown (eMouseLeft))  gIconbar.Visible = true;

Melee Island Resident

I'd like it to be when the mouse button is held down the GUI becomes visible

Melee Island Resident

#4
thank you matti

Melee Island Resident

i got the script from a very old thread, so some things are obsolete

   holddown ++;
   if (holddown >= 40) {
        holddown = 0;
       gIconbar.Visible = true;

GlobalScript.asc(75): Error (line 75): Undefined token 'holddown'

what is the newer equivalent of this script?

Hernald

You need to define holddown as an integer and put a curly bracket at the end, other than that the code looks workable.
Oh yes, and it's part of a while loop or in execute repeatedly, and when you define holddown give it an initial value of 0.

Khris

You need to get the syntax and other programming conventions straight.
This is a good starting point:
http://www.adventuregamestudio.co.uk/actutor.htm

SMF spam blocked by CleanTalk