ID:156669
 
Okay, here I have a code, that I want to show/hide a window. This is practice, but for some reason, it won't work, and I'm new to winset/show/get, etc, so it might be something stupid I'm forgetting

mob/verb/Showhide()

var/H = winget(src,"main","not-visible")
var/S = winget(src,"main","visible")

if(H == "False")
winshow(src,"main",1)
else
if(S == "True")
winshow(src,"main",0)
Just to let you know as a reminder, because I'm sure you've already noticed, many of your posts contain questions which can be found by reading the material first, and many of your answers is links to the material. So, I shall reduntantly link you to the proper material:

file:///C:/Program%20Files%20(x86)/BYOND/help/ref/ skinparams.html
There are no such control parameters as 'visible' and 'not-visible' as far as I'm aware. Nor does it make sense for there to be 2 parameters for the same thing, or to query 2 params for the same thing.
If you read the Skin Reference, you'll see that the parameter you want is is-visible.

There's another problem. You're directly comparing the result of winget() to the strings "False" and "True". Comparing strings with the == operator amounts to a case sensitive comparison, and the values boolean parameters have are "true" and "false".
In response to Kaioken
Ah, thank you guys, I figured it out. Sorry for the stupidity >_<
In response to OrangeWeapons
It's useful to link people to the reading material
(yes, it's supposed to be redundant, but sadly it's not as people don't have the common sense to go to it on their own). However, I wonder if you've noticed you've linked to your own local version, on your HDD... =P
Incidentally, it can work provided the viewer copies and goes to the address manually (or you manually make it a hyperlink) and the viewer has BYOND installed in the same folder you do (which is less likely in this case because you have a x86_64 system which uses a different default folder than x86_32 systems).
And all this paragraph just to say: it's indeed much more useful to link to the online version instead. ;) True that it's relatively buried, as there isn't a link to it directly in the Developers menu, only to the 'language reference'. I believe I've requested for it to be added there in the past...
In response to Kaioken
was wondering if there's a way to make the test window not pop-up when I start the game.

maybe under login, something like

winset(src,"main",is-visible = false)
^doubt that one, or

winshow(src,"main",0) <-----I'm thinking this one is right.

That's just a guess
In response to Kaioken
Yes, I could not seem to find it...Also Kaioken, you better renew your membership so I can know who you are by the icon next to your name! :P
In response to Chaorace
Chaorace wrote:
was wondering if there's a way to make the test window not pop-up when I start the game.

maybe under login, something like

winset(src,"main",is-visible = false)
^doubt that one, or

winshow(src,"main",0) <-----I'm thinking this one is right.

That's just a guess
^^^^^^^^^^^^^^^^^
Do you guys think that would work?
In response to Chaorace
Yes, it's 0 to get rid of the window, and 1 to reveal it.
In response to Chaorace
I got another Question about showing/hiding windows.

Like, can I use winshow to show the OOC box which is in another window to be defaulted like the main window, so you don tgotta click on the ooc box to switch to that window to type. And still be able to move while typing thing.
In response to Chaorace
im guessing i bumped too early?
In response to Chaorace
Chaorace wrote:
was wondering if there's a way to make the test window not pop-up when I start the game.

Like, un-checking the 'visible' box when creating the window in the interface editor?
In response to Schnitzelnagler
I already figured it out, thanks though. My problem now is to get it so like i make an OOC in a new window and try to get it ti cinnect to default so you don't gotta click on the ooc window then type then click default to switch back.