Missing Parser/Command Bar
XanMag
28 Mar 2020, 20:34I have a lot of code in my game and since it has been such a LONG process in creating the game I'm running into weird problems to which I cannot find the solution.
As I move my player around to different rooms to carry out testing, I'm finding out the some places where I start my player there is no parser/input bar. I cannot see why or where this happens. Any guesses?
I do have the
HideCommandBar
script running in my title room screen, but I have the
ShowCommandBar
script running when my player gets chucked into the first room of the game. However, I'm not sure why that would affect rooms differently. Thanks in advance.

Dcoder
29 Mar 2020, 02:37Are you saying that if you start your player in ANY room OTHER than your regular starting room, there is no command bar? Or do some rooms start with a command bar and others don't? The former situation could make sense; the latter doesn't make obvious sense.

Dcoder
29 Mar 2020, 03:23Are you using therequest (Hide, "Command")
and request (Show, "Command")
scripts? 'Cuz HideCommandBar
and ShowCommandBar
just give errors.
XanMag
29 Mar 2020, 23:48Whether there is a command bar depends on which rooms I move my character to while testing.

Dcoder
30 Mar 2020, 09:22Maybe you could provide additional info should it arise...
XanMag
30 Mar 2020, 19:45The following is in the game object attributes box:
<style type="text/css">div#txtCommandDiv {border:none; font-size:12pt; font-family:Georgia, serif; } input#txtCommand { outline:none; border:none; font-size:16px; margin:0; padding:0; }</style>
<style type="text/css">
div#txtCommandDiv {
border: none;
background: no-repeat;
}
input#txtCommand {
outline:none;
border: none;
margin:0;
padding:0;
max-width: 1000px;
}
#status { display: none !important; visibility: hidden !important; }
</style>
This is in the start script:
JS.eval ("getCSSRule('a.cmdlink').style.color='#000000'")
JS.setCommandBarStyle (GetCurrentTextFormat("") + ";border:" + game.defaultbackground)
// The next line was added to by KV
JS.eval ("$('#txtCommandDiv').css('color', 'DarkGreen');uiHide('#txtCommandDiv');uiHide('#gamePanes');$('body').css('background','black');")
// The next line was added by KV
This is in the first "real room" of my game:
ClearScreen
ShowCommandBar
And these are the command bar functions being called:
request (Show, "Command")
request (Hide, "Command")
So, long story short... yes, I am using the commands you mentioned.

Dcoder
31 Mar 2020, 06:09Sorry, KV's code is a little over my head. Maybe mrangel could help you out...