ID:97287
 
Not a bug
BYOND Version:470
Operating System:Windows XP Pro
Web Browser:Firefox 3.6.3
Applies to:Dream Seeker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
My windows in my skin are all opening up regardless if i closed them.
        winshow(src,"main",0)

For Example:
This piece of code says to close the main window but when i run the src it opens up.
Numbered Steps to Reproduce Problem:
Run src


Expected Results:
Main windows should be closed
Actual Results:
It is open
Does the problem occur:
Every time? Or how often?
Everytime as long as my skin.dmf is checkd in

When does the problem NOT occur?
When i uncheck my skin.dmf
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
It just started happening after i updated my BYOND
Workarounds:

You forgot the first argument in winshow(), the player whose window will be hidden.
Lummox JR wrote:
You forgot the first argument in winshow(), the player whose window will be hidden.

O dont be fooled the code above was just an example i made and forgot to add the mob.Inside my real code i added all args.
winshow(usr,"win") etc.
Well, bear in mind when you post a bug report I can only work with the info you provide. As no errors have been observed in winshow() beyond this, you'll have to provide a demo that shows the problem in action. If you do have such a demo and it turns out to show a real problem, then I will reopen the bug report so it can be fixed.
Lummox JR wrote:
You forgot the first argument in winshow(), the player whose window will be hidden.
        winshow(src,"raceselectionwin",0)
winshow(src,"hairselectionwin",0)
winshow(src,"inventorywin",0)
winshow(src,"gmverbs",0)
winshow(src,"loginwin",1)

I did put the the mob arg in winshow() if i didn't i usually will get a run time error.This is my exact coding above.winshow() is not closing these down.All of my windows open including the ones i set to zero.
Please post a demo.
Lummox JR wrote:
Please post a demo.
How do i make a demo?
Just make a project that shows the problem in action. If it's easier, you can just strip down your existing game until it happens. Sometimes bugs come from a complex series of interactions and aren't as easy to show in a project built from scratch.

You can send the demo to me in a .zip at [email protected]. Be sure to include exact steps I should follow to cause the issue to occur, and information on what behavior I should be seeing vs. what I'll actually see with the bug.

If you are unable to strip down your source, you can simply send that to me with the same detailed info on how to trigger the bug.
OK i am gonna try this but how about i host the game and you login and see for yourself.
No, that won't work. I need to see what's going on under the hood, with a skin and the source that's triggering it. So either you'll need to strip down your source to something that shows the bug without including anything else, or use the full source, or find a way to cause the bug in a project built from scratch.
Ok i am sending my entire source to you.Take note that this is my first world and i am a midbie coder and feel free to leave any coding suggestions if you want.
GrimmJore wrote:
Ok i am sending my entire source to you.Take note that this is my first world and i am a midbie coder and feel free to leave any coding suggestions if you want.
Did you get my source?
I got your source, but I see no notes on how and where to trigger the bug, and what I should be seeing vs. what I'll actually be seeing. I need to know what to do to reproduce the issue.
Lummox JR wrote:
I got your source, but I see no notes on how and where to trigger the bug, and what I should be seeing vs. what I'll actually be seeing. I need to know what to do to reproduce the issue.

Run the source.. and try to minimize the first window you see and you should see all of my windows open, when instead there should only be one at a time.
In my Character Handling i closed my windows right after the login() with winshow() but hey open up regardless when i run the src.


What you suppose see:

One window open at a time.As you click the buttons to transition from one window to another certain windows should close and open.

What you actually see:

All windows open at Login.when i click the finish button to move me from one window to the next it takes me back to start.


Trigger

Run the source
One option you have is to uncheck the "visible" option for the windows you don't want to show at first.

One new pieces of information you did not include in your original report. One is that the problem only occurs when the winshow() calls are made during Login(). That's rather significant. Please be sure to include as many details as you can when posting future bug reports, because this one little piece of information makes the difference between being able to see the issue or not. Even just posting the whole Login() proc would have made the context clear.

I'll see if I can get a small demo to do this too.
ok i keep that in mind and i have tried unchecking the visible but that will result in not showing the window at all even if i call it.
I was right the first time; there is no bug. The issue you're having is that you have three separate Login() procs, only one of which calls ..(). The one that's running does not call ..(), and its winshows only apply to two keys.

While adding ..() may fix the problem, it also may not, because there is no guarantee which version of mob/Login() will be called first. This is a major design flaw. You should keep all your mob/Login() code in one place, which will eliminate all ambiguity.
Unbelievable .....thank you
SOLVED