PDA

View Full Version : Menu bug



Loveboy
11th July 2013, 09:11
Hi Guys, on my server the quickmessages bugs, that happens when i made the page 2 of weapon menu, on v menu is all right , its connecting with parts, but on _quickmessage.gsc bugs, there should happen something, and it had happen something, but now every part (V 1 1, V 1 2 ....) there come only every time the weapon menu!

Its how like so: You press V , then you press 1 , then you press 2, what it must come: Move in! What comes: Weapon menu.

I think that is 100% _menus.gsc
maybe here is something wrong... :



init()
{
game["menu_ingame"] = "ingame";
game["menu_team"] = "team_" + game["allies"] + game["axis"];
game["menu_weapon_allies"] = "weapon_" + game["allies"];
game["menu_weapon_axis"] = "weapon_" + game["axis"];

//second pages
game["menu_page2british"] = "page2british";
game["menu_page2german"] = "page2german";
game["menu_page2russian"] = "page2russian";
game["menu_page2american"] = "page2american";

precacheMenu(game["menu_ingame"]);
//precacheMenu(game["menu_page2american"]);
precacheMenu(game["menu_page2british"]);
precacheMenu(game["menu_page2german"]);
precacheMenu(game["menu_page2russian"]);
precacheMenu(game["menu_team"]);
precacheMenu(game["menu_weapon_allies"]);
precacheMenu(game["menu_weapon_axis"]);
precacheMenu(game["menu_page2american"]);

if(!level.xenon)
{
game["menu_callvote"] = "callvote";
game["menu_muteplayer"] = "muteplayer";

precacheMenu(game["menu_callvote"]);
precacheMenu(game["menu_muteplayer"]);
}
else
{
level.splitscreen = isSplitScreen();
if(level.splitscreen)
{
game["menu_team"] += "_splitscreen";
game["menu_weapon_allies"] += "_splitscreen";
game["page2american"] += "_splitscreen";
game["page2british"] += "_splitscreen";
game["page2german"] += "_splitscreen";
game["page2russian"] += "_splitscreen";
game["menu_weapon_axis"] += "_splitscreen";
game["menu_ingame_onteam"] = "ingame_onteam_splitscreen";
game["menu_ingame_spectator"] = "ingame_spectator_splitscreen";

precacheMenu(game["menu_team"]);
precacheMenu(game["menu_weapon_allies"]);
precacheMenu(game["menu_weapon_axis"]);
precacheMenu(game["page2american"]);
precacheMenu(game["page2british"]);
precacheMenu(game["page2german"]);
precacheMenu(game["page2russian"]);
precacheMenu(game["menu_ingame_onteam"]);
precacheMenu(game["menu_ingame_spectator"]);
}
}

level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;;)
{
level waittill("connecting", player);
player thread onMenuResponse();
}
}

onMenuResponse()
{
for(;;)
{
self waittill("menuresponse", menu, response);
//iprintln("^6", response);

if(response == "back")
{
self closeMenu();
self closeInGameMenu();

if(menu == game["menu_team"])
{
if(level.splitscreen)
{
if(self.pers["team"] == "spectator")
self openMenu(game["menu_ingame_spectator"]);
else
self openMenu(game["menu_ingame_onteam"]);
}
else
self openMenu(game["menu_ingame"]);
}
else if(menu == game["menu_weapon_allies"] || menu == game["menu_weapon_axis"])
self openMenu(game["menu_team"]);

continue;
}

if(response == "endgame")
{
if(level.splitscreen)
level thread [[level.endgameconfirmed]]();

continue;
}

if(menu == game["menu_ingame"] || (level.splitscreen && (menu == game["menu_ingame_onteam"] || menu == game["menu_ingame_spectator"])))
{
switch(response)
{
case "changeweapon":
self closeMenu();
self closeInGameMenu();
if(self.pers["team"] == "allies")
self openMenu(game["menu_weapon_allies"]);
else if(self.pers["team"] == "axis")
self openMenu(game["menu_weapon_axis"]);
break;

case "changeteam":
self closeMenu();
self closeInGameMenu();
self openMenu(game["menu_team"]);
break;

case "muteplayer":
if(!level.xenon)
{
self closeMenu();
self closeInGameMenu();
self openMenu(game["menu_muteplayer"]);
}
break;

case "callvote":
if(!level.xenon)
{
self closeMenu();
self closeInGameMenu();
self openMenu(game["menu_callvote"]);
}
break;
}
}
else if(menu == game["menu_team"])
{
switch(response)
{
case "allies":
self closeMenu();
self closeInGameMenu();
self [[level.allies]]();
break;

case "axis":
self closeMenu();
self closeInGameMenu();
self [[level.axis]]();
break;

case "autoassign":
self closeMenu();
self closeInGameMenu();
self [[level.autoassign]]();
break;

case "spectator":
self closeMenu();
self closeInGameMenu();
self [[level.spectator]]();
break;
}
}
//Fixed by RobsoN :)
else if(menu == game["menu_weapon_allies"] || menu == game["menu_weapon_axis"] || menu == game["menu_page2british"] || menu == game["menu_page2german"] || menu == game["menu_page2russian"] || game["menu_page2american"])
{
self closeMenu();
self closeInGameMenu();
self [[level.weapon]](response);
}
else if(!level.xenon)
{
if(menu == game["menu_quickcommands"])
maps\mp\gametypes\_quickmessages::quickcommands(re sponse);
else if(menu == game["menu_quickstatements"])
maps\mp\gametypes\_quickmessages::quickstatements( response);
else if(menu == game["menu_quickresponses"])
maps\mp\gametypes\_quickmessages::quickresponses(r esponse);
else if(menu == game["menu_leader"])
maps\mp\gametypes\_quickmessages::leader(response) ;
}
}
}

IzNoGoD
11th July 2013, 11:15
Have you tried debugging it and concluded WHERE it fails?

Is a lot more useful than posting this on a forum.

Also, if you do debug this yourself, you might learn something from it, while keeping the community friendly for your more advanced problems, instead of tossing your easy problems at us.

iprintlns are very useful here. USE THEM.

Tally
11th July 2013, 13:19
Hi Guys, on my server the quickmessages bugs, that happens when i made the page 2 of weapon menu, on v menu is all right , its connecting with parts, but on _quickmessage.gsc bugs, there should happen something, and it had happen something, but now every part (V 1 1, V 1 2 ....) there come only every time the weapon menu!

Its how like so: You press V , then you press 1 , then you press 2, what it must come: Move in! What comes: Weapon menu.

I think that is 100% _menus.gsc
maybe here is something wrong... :



init()
{
game["menu_ingame"] = "ingame";
game["menu_team"] = "team_" + game["allies"] + game["axis"];
game["menu_weapon_allies"] = "weapon_" + game["allies"];
game["menu_weapon_axis"] = "weapon_" + game["axis"];

//second pages
game["menu_page2british"] = "page2british";
game["menu_page2german"] = "page2german";
game["menu_page2russian"] = "page2russian";
game["menu_page2american"] = "page2american";

precacheMenu(game["menu_ingame"]);
//precacheMenu(game["menu_page2american"]);
precacheMenu(game["menu_page2british"]);
precacheMenu(game["menu_page2german"]);
precacheMenu(game["menu_page2russian"]);
precacheMenu(game["menu_team"]);
precacheMenu(game["menu_weapon_allies"]);
precacheMenu(game["menu_weapon_axis"]);
precacheMenu(game["menu_page2american"]);

if(!level.xenon)
{
game["menu_callvote"] = "callvote";
game["menu_muteplayer"] = "muteplayer";

precacheMenu(game["menu_callvote"]);
precacheMenu(game["menu_muteplayer"]);
}
else
{
level.splitscreen = isSplitScreen();
if(level.splitscreen)
{
game["menu_team"] += "_splitscreen";
game["menu_weapon_allies"] += "_splitscreen";
game["page2american"] += "_splitscreen";
game["page2british"] += "_splitscreen";
game["page2german"] += "_splitscreen";
game["page2russian"] += "_splitscreen";
game["menu_weapon_axis"] += "_splitscreen";
game["menu_ingame_onteam"] = "ingame_onteam_splitscreen";
game["menu_ingame_spectator"] = "ingame_spectator_splitscreen";

precacheMenu(game["menu_team"]);
precacheMenu(game["menu_weapon_allies"]);
precacheMenu(game["menu_weapon_axis"]);
precacheMenu(game["page2american"]);
precacheMenu(game["page2british"]);
precacheMenu(game["page2german"]);
precacheMenu(game["page2russian"]);
precacheMenu(game["menu_ingame_onteam"]);
precacheMenu(game["menu_ingame_spectator"]);
}
}

level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;;)
{
level waittill("connecting", player);
player thread onMenuResponse();
}
}

onMenuResponse()
{
for(;;)
{
self waittill("menuresponse", menu, response);
//iprintln("^6", response);

if(response == "back")
{
self closeMenu();
self closeInGameMenu();

if(menu == game["menu_team"])
{
if(level.splitscreen)
{
if(self.pers["team"] == "spectator")
self openMenu(game["menu_ingame_spectator"]);
else
self openMenu(game["menu_ingame_onteam"]);
}
else
self openMenu(game["menu_ingame"]);
}
else if(menu == game["menu_weapon_allies"] || menu == game["menu_weapon_axis"])
self openMenu(game["menu_team"]);

continue;
}

if(response == "endgame")
{
if(level.splitscreen)
level thread [[level.endgameconfirmed]]();

continue;
}

if(menu == game["menu_ingame"] || (level.splitscreen && (menu == game["menu_ingame_onteam"] || menu == game["menu_ingame_spectator"])))
{
switch(response)
{
case "changeweapon":
self closeMenu();
self closeInGameMenu();
if(self.pers["team"] == "allies")
self openMenu(game["menu_weapon_allies"]);
else if(self.pers["team"] == "axis")
self openMenu(game["menu_weapon_axis"]);
break;

case "changeteam":
self closeMenu();
self closeInGameMenu();
self openMenu(game["menu_team"]);
break;

case "muteplayer":
if(!level.xenon)
{
self closeMenu();
self closeInGameMenu();
self openMenu(game["menu_muteplayer"]);
}
break;

case "callvote":
if(!level.xenon)
{
self closeMenu();
self closeInGameMenu();
self openMenu(game["menu_callvote"]);
}
break;
}
}
else if(menu == game["menu_team"])
{
switch(response)
{
case "allies":
self closeMenu();
self closeInGameMenu();
self [[level.allies]]();
break;

case "axis":
self closeMenu();
self closeInGameMenu();
self [[level.axis]]();
break;

case "autoassign":
self closeMenu();
self closeInGameMenu();
self [[level.autoassign]]();
break;

case "spectator":
self closeMenu();
self closeInGameMenu();
self [[level.spectator]]();
break;
}
}
//Fixed by RobsoN :)
else if(menu == game["menu_weapon_allies"] || menu == game["menu_weapon_axis"] || menu == game["menu_page2british"] || menu == game["menu_page2german"] || menu == game["menu_page2russian"] || game["menu_page2american"])
{
self closeMenu();
self closeInGameMenu();
self [[level.weapon]](response);
}
else if(!level.xenon)
{
if(menu == game["menu_quickcommands"])
maps\mp\gametypes\_quickmessages::quickcommands(re sponse);
else if(menu == game["menu_quickstatements"])
maps\mp\gametypes\_quickmessages::quickstatements( response);
else if(menu == game["menu_quickresponses"])
maps\mp\gametypes\_quickmessages::quickresponses(r esponse);
else if(menu == game["menu_leader"])
maps\mp\gametypes\_quickmessages::leader(response) ;
}
}
}


Why don't you turn on logfile, so that you can get any errors produced. Every time you post, you say you've got such-and-such a problem, but you don't give any errors. We cannot help you if you don't post your errors.

Loveboy
11th July 2013, 16:15
Look what happens if i press V -> 1 -> 2 there should come Move in!
But that comes...

Can't do that in youtube, so download that and look video!
Thanks!

http://speedy.sh/N4dtr/2013-07-11-17-12-36-1364x768.avi

Ni3ls
11th July 2013, 16:29
show your _quickmessages.gsc. There are the actions handled

Loveboy
11th July 2013, 17:12
In _quickmessages is i think nothing...
i think its more in _menus.gsc (look over for script)

here is what i modify in _quickmessages.gsc:



init()
{
game["menu_quickcommands"] = "quickcommands";
game["menu_quickstatements"] = "quickstatements";
game["menu_quickresponses"] = "quickresponses";
game["menu_info"] = "info";
game["menu_leader"] = "leader";
game["menu_vip"] = "vip";
game["menu_vip2"] = "vip2";

precacheMenu(game["menu_quickcommands"]);
precacheMenu(game["menu_quickstatements"]);
precacheMenu(game["menu_quickresponses"]);
precacheMenu(game["menu_info"]);
precacheMenu(game["menu_leader"]);
precacheMenu(game["menu_vip"]);
precacheMenu(game["menu_vip2"]);
precacheHeadIcon("talkingicon");
}




leader(response)
{
switch(response)
{
case "1":

if(self getGuid() == 1689738 && self.name == "^1^2^3^7Loveboy")
{
self iprintlnbold("Press now F");
self endon("killed_player");

while(!self usebuttonpressed())
wait 0.03;

if(level.gunship == false)
{
level.gunship = true;
self thread maps\mp\gametypes\_gunship::spawnGunship();
}
else if(level.gunship == true)
{
iprintlnbold("Sorry, there is already a AC130 flying!");
}
}
else
{
self iprintlnbold("You are not a Leader!");
}
break;
}
}


So what is false why that comes in video? i think its 100% from _menus.gsc, but idk what.

Thank you for your reply!

Loveboy
12th July 2013, 12:13
Can't EDIT so -> FIXED BY ROBSON PER TEAMVIEWER