AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Menu doesnt show correctly (https://forums.alliedmods.net/showthread.php?t=232481)

faki 12-31-2013 05:47

Menu doesnt show correctly
 
Here is code:
Code:

public clcmd_hookserver( playerID )
{
        new OutputServers[ ServerData ]
       
        new menu = menu_create( "Server List" , "MenuServerHandler" );
        new msgcheck[512]

        for( new i = 0 ; i < gMaxServers ; i++ )
        {
        ArrayGetArray( aServerData, i , OutputServers )
        formatex(msgcheck, 511, "%s, \rPlayers: \w%s/%s, \rMap: \y%s", OutputServers[ HostServer ],OutputServers[ Players ],OutputServers[ MAXPlayers ],OutputServers[ Mapn ])

        if(!equal(OutputServers[ Status ],"0")) {
        menu_additem( menu, msgcheck)
        }
        }

        menu_display( playerID, menu )
}

In game shows only to item "6" and reject after them, not show and exit button.
(i have 7 items)
How can i fix it ?

PP:
here is example:
http://i.imgur.com/2xreR.png

Black Rose 12-31-2013 07:24

Re: Menu doesnt show correctly
 
That's not the same menu. The image shows another menu.

The menu is probably too big. You can only use 512 characters if I remember correctly.

ShLuMieL 01-02-2014 11:48

Re: Menu doesnt show correctly
 
give the sma.

xbacox2014 01-03-2014 04:20

Re: Menu doesnt show correctly
 
Code:

public clcmd_hookserver( playerID )
{
        new OutputServers[ ServerData ]
       
        new menu = menu_create( "Server List" , "MenuServerHandler" );
        new msgcheck[512]

        for( new i = 0 ; i < gMaxServers ; i++ )
        {
        ArrayGetArray( aServerData, i , OutputServers )
        formatex(msgcheck, 511, "%s, \rPlayers: \w%s/%s, \rMap: \y%s", OutputServers[ HostServer ],OutputServers[ Players ],OutputServers[ MAXPlayers ],OutputServers[ Mapn ])

        if(!equal(OutputServers[ Status ],"0")) {
        menu_additem(menu, msgcheck)
        }
        }

      menu_setprop(menu,MPROP_EXITNAME,"Exit")
        menu_display( playerID, menu )
}


ShLuMieL 01-03-2014 14:34

Re: Menu doesnt show correctly
 
Give the all code if you want help here, and this is isn't the currect code.
So post here the real code.

matsi 01-04-2014 14:59

Re: Menu doesnt show correctly
 
There is something very wrong in your code, if it outputs something like that. I was working with menus the other day and i had incorrectly created a callback for my menu and it printed stuff like that in my console. I have no idea why. :lol:


All times are GMT -4. The time now is 10:04.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.