ID:265003
 
Hey, Thnx for coming in.....:


Problem description:

Hey,


I made a menu (example: File,Options and Messages and stuff that is up on the left) and made it function but the problem is, i need it to be undisabled when a button is pressed, how do i do that like whats the var that i use?
is-disabled
In response to Hassanjalil
Hassanjalil wrote:
is-disabled

i should write the name of the menu before that like it would be like this:

Tournament is-disabled = 0

cuz i want to undisable it not disable it??

tell me how the code would look like thnx
In response to Uzumaki naruto 1998
mob/verb/ToggleMenu(var/name as text)
if(winget(src,name,"is-disabled")=="true")
winset(src,name,"is-disable=false")
else
winset(src,name,"is-disable=true")
In response to Hassanjalil
Hassanjalil wrote:
> mob/verb/ToggleMenu(var/name as text)
> if(winget(src,name,"is-disabled")=="true")
> winset(src,name,"is-disable=false")
> else
> winset(src,name,"is-disable=true")
>

I am srry i am giving u a hard time but this my first time i use a code like this..... what exactly should i change and into what??

The menu is called Tournament.
In response to Uzumaki naruto 1998
Uzumaki naruto 1998 wrote:
Hassanjalil wrote:
> > mob/verb/ToggleMenu(var/name as text)
> > if(winget(src,name,"is-disabled")=="true")
> > winset(src,name,"is-disable=false")//to disable it
> > else
> > winset(src,name,"is-disable=true")//to enable it
In response to Hassanjalil
Hassanjalil wrote:
Uzumaki naruto 1998 wrote:
Hassanjalil wrote:
> > > mob/verb/ToggleMenu(var/name as text)
> > > if(winget(src,name,"is-disabled")=="true")
> > > winset(src,name,"is-disable=false")//to disable it
> > > else
> > > winset(src,name,"is-disable=true")//to enable it

i know that but if i keep it the same it gives me a textbox....
In response to Uzumaki naruto 1998
Uzumaki naruto 1998 wrote:
Hassanjalil wrote:
Uzumaki naruto 1998 wrote:
Hassanjalil wrote:
> > > > mob/verb/ToggleMenu(var/name as text)
> > > > if(winget(src,Tournament,"is-disabled")=="true")
> > > > winset(src,Tournament,"is-disable=false")//to disable it
> > > > else
> > > > winset(src,Tournament,"is-disable=true")//to enable it

Try this
In response to Chaokai
Chaokai wrote:
Uzumaki naruto 1998 wrote:
Hassanjalil wrote:
Uzumaki naruto 1998 wrote:
Hassanjalil wrote:
> > > > > mob/verb/ToggleMenu(var/name as text)
> > > > > if(winget(src,Tournament,"is-disabled")=="true")
> > > > > winset(src,Tournament,"is-disable=false")//to disable it
> > > > > else
> > > > > winset(src,Tournament,"is-disable=true")//to enable it
>
> Try this

It gives me 3 errors on the three Tournament this is my code now.


mob
verb
ToggleMenu(var/name as text)
if(winget(src,Tournament, "is-disabled")=="true")
winset(src,Tournament, "is-disable=false")
else
winset(src,Tournament, "is-disable=true")
In response to Uzumaki naruto 1998
Uzumaki naruto 1998 wrote:
Chaokai wrote:
Uzumaki naruto 1998 wrote:
Hassanjalil wrote:
Uzumaki naruto 1998 wrote:
Hassanjalil wrote:
> > > > > > mob/verb/ToggleMenu(var/name as text)
> > > > > > if(winget(src,Tournament,"is-disabled")=="true")
> > > > > > winset(src,Tournament,"is-disable=false")//to disable it
> > > > > > else
> > > > > > winset(src,Tournament,"is-disable=true")//to enable it
> >
> > Try this
>
> It gives me 3 errors on the three Tournament this is my code now.
>
>
> mob
> verb
> ToggleMenu(var/name as text)
> if(winget(src,Tournament, "is-disabled")=="true")
> winset(src,Tournament, "is-disable=false")
> else
> winset(src,Tournament, "is-disable=true")

well if you use your brain the it would be like this
winset(src,"Tournament", "is-disable=false")
and learn how to code first
http://www.byond.com/members/Falacy/forum?id=34056#34056
In response to Hassanjalil
well if you use your brain the it would be like this
winset(src,"Tournament", "is-disable=false")
and learn how to code first
http://www.byond.com/members/Falacy/forum?id=34056#34056

Yeah i am so stupid i never think and btw IT ALSO BROUGHT A TEXT BOX!!!!..... anyways thnx for trying to help me...
In response to Uzumaki naruto 1998
and image would be better show me what text box
In response to Hassanjalil
Shouldn't it be like..
mob/verb/ToggleMenu(name as text)

Instead of...
mob/verb/ToggleMenu(var/name as text)

Rly?