AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Which is the maximun len for a menu? (https://forums.alliedmods.net/showthread.php?t=90051)

Unlimited! 04-13-2009 11:57

Which is the maximun len for a menu?
 
I have this menu and sometimes it isn't shown, it doesen't cut, it doesen't show. Another times it does.

PHP Code:

public show_menu_stats(id)
{
    
// Player disconnected
    
if (!is_user_connected(id))
    return;
    
    static 
menu[450], len
    len 
0
    
static name[27]
    
get_user_name(idname26)
    
len += formatex(menu[len], sizeof menu len"\yEstadisticas de jugador^n^n")
    
len += formatex(menu[len], sizeof menu len"\yAlias:\w %s^n"name)
    
len += formatex(menu[len], sizeof menu len"\yAP:\w %d \y Clase Humana: \w%s^n"g_ammopacks[id], level_name[ID_CLASE])
    
len += formatex(menu[len], sizeof menu len"\yAP para proximo nivel:\w %d^n",  g_nextlevel[id] - g_ammopacks[id])
    
len += formatex(menu[len], sizeof menu len"\yNiveles para proxima clase:\w %d^n",  15 - (g_level[id] - 15*ID_CLASE))
    
len += formatex(menu[len], sizeof menu len"\yProxima clase:\w %s^n"level_name[ID_CLASE 1])
    
len += formatex(menu[len], sizeof menu len"\yPuntos humanos:\w %d\y Puntos zombie:\w %d^n"g_h_points[id], g_z_points[id])
    
len += formatex(menu[len], sizeof menu len"\yPuntos de danio:\w %d\y Bonifi. de danio:\w %d^n"g_h_updamage[id], g_h_updmg[id])
    
len += formatex(menu[len], sizeof menu len"\yPuntos de vida:\w %d\y Bonifi. de vida:\w %d^n"g_z_uphealth[id], g_z_uphp[id])
    
len += formatex(menu[len], sizeof menu len"\yHumanos Infectados:\w %d^n"g_stats_2[id])
    
len += formatex(menu[len], sizeof menu len"\yZombies Matados:\w %d^n"g_stats_1[id])
    
//len += formatex(menu[len], sizeof menu - 1 - len, "\yTiempo Jugado:\w %s %H horas^n", jugado)
    
    
show_menu(idKEYSMENUmenu, -1"Stats")



Empowers 04-13-2009 11:59

Re: Which is the maximun len for a menu?
 
PHP Code:

menu[450

450 is the max len.
Change that to values that u need.

Unlimited! 04-13-2009 12:15

Re: Which is the maximun len for a menu?
 
Quote:

Originally Posted by Empowers (Post 804549)
PHP Code:

menu[450

450 is the max len.
Change that to values that u need.

I know that, but that isn't the matter. If that len was short, the menu would shown cut
ie:
instead of
Quote:

Hello my friend
it'd be
Quote:

Hello my fr
What I mean is a limit for HL engine for sending big menues...

edit: I even tried by using [1000] and it didn't worked.

Empowers 04-13-2009 12:18

Re: Which is the maximun len for a menu?
 
Hmm.. I saw the same.. When i was translating menu to russian.. Russian letters are to big in cs, so in long lines ends were cut :)

Unlimited! 04-13-2009 12:20

Re: Which is the maximun len for a menu?
 
Quote:

Originally Posted by Empowers (Post 804576)
Hmm.. I saw the same.. When i was translating menu to russian.. Russian letters are to big in cs, so in long lines ends were cut :)

Yes but here they aren't cut. The menu doesen't even show up....

Empowers 04-13-2009 12:23

Re: Which is the maximun len for a menu?
 
Maybe somethink with menu menu try to comment some lines..

Unlimited! 04-13-2009 12:37

Re: Which is the maximun len for a menu?
 
Sorry I fixed it, it was a n00b error

YamiKaitou 04-13-2009 12:38

Re: Which is the maximun len for a menu?
 
Quote:

Originally Posted by Unlimited! (Post 804593)
Sorry I fixed it, it was a n00b error

Saying the fix will assist others who get the same error

Unlimited! 04-13-2009 12:39

Re: Which is the maximun len for a menu?
 
Quote:

Originally Posted by YamiKaitou (Post 804594)
Saying the fix will assist others who get the same error

Checking the size of an array LOL


All times are GMT -4. The time now is 02:15.

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