Raised This Month: $32 Target: $400
 8% 

[New style menu] +1 will appear [}]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-21-2013 , 17:05   [New style menu] +1 will appear [}]
Reply With Quote #1

Hello Allied modders!

Basically i noticed that if there is somewhere in menu text +1 it will be [}] in the game.
Is there any way to fix this?

And as always, thanks!
.Dare Devil. is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-22-2013 , 01:20   Re: [New style menu] +1 will appear [}]
Reply With Quote #2

Show some code or explain a different way plz
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-22-2013 , 09:25   Re: [New style menu] +1 will appear [}]
Reply With Quote #3

alright...

this is what i see in notepad
PHP Code:
formatexbcharsmax(b), "\w%L +1"id"color_costomadd1" )
menu_additem(mb"30"
this is what i see ingame
Quote:
1. Red [}]1
I noticed that even old menu style do that.
if i but something between + and 1 then its fine, also with ohter numbers it wont do that.

Last edited by .Dare Devil.; 07-22-2013 at 09:27.
.Dare Devil. is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-22-2013 , 11:10   Re: [New style menu] +1 will appear [}]
Reply With Quote #4

You compiled locally ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-22-2013 , 11:23   Re: [New style menu] +1 will appear [}]
Reply With Quote #5

Quote:
Originally Posted by ConnorMcLeod View Post
You compiled locally ?
yes, also with variable it does the same thing

PHP Code:
formatexbcharsmax(b), "\w%L +%d"g_something
( g_something holds 1 )

Last edited by .Dare Devil.; 07-22-2013 at 11:23.
.Dare Devil. is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-22-2013 , 15:16   Re: [New style menu] +1 will appear [}]
Reply With Quote #6

I thought that ML coding was supposed to be this way:
Code:
formatex(str, charsmax(str), "%L", id, "LANG_KEY", 1);
Code:
LANG_KEY = \wblah blah +%d
Am I incorrect?
Statement from AMXx documentation i believe:
1. "%L" tells the string formatter to start a language translation. "%L" must always occur by itself like it is here.

Will it display the same result in a console window instead of an ingame menu?



I can't reproduce the problem.
Here's my code and result:
Code:
#include <amxmodx> public plugin_init() {     register_plugin("Test Plugin 9", "1.0", "Black Rose");     register_dictionary("test9.txt") } public client_connect(id) {     set_task(3.0, "testfunc", id); } public testfunc(id) {     new b[1024];     new m = menu_create("Testmenu", "handler", 0);     formatex(b, charsmax(b), "\w%L +1", id, "color_costomadd1");     menu_additem(m, b, "30");     menu_display(id, m); } public handler() { }

Code:
[en]
color_costomadd1 = Red


What are you doing differently?

Last edited by Black Rose; 07-22-2013 at 15:45.
Black Rose is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-23-2013 , 00:43   Re: [New style menu] +1 will appear [}]
Reply With Quote #7

You have \w included in ML file.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 07-23-2013 , 02:41   Re: [New style menu] +1 will appear [}]
Reply With Quote #8

It happens in old style menus too. When you display in menu text +<something> it will be replaced with [<key>], if +<something> is a command bound to that <key>. For example if you try to display "+use" it will be replaced with "[E]" (assuming that you have "bind e +use" in your config).
__________________
Impossible is Nothing

Last edited by Sylwester; 07-23-2013 at 02:42.
Sylwester is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-23-2013 , 03:07   Re: [New style menu] +1 will appear [}]
Reply With Quote #9

This is funny.
Nice to know.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 07-23-2013 , 05:24   Re: [New style menu] +1 will appear [}]
Reply With Quote #10

Quote:
Originally Posted by ConnorMcLeod View Post
This is funny.
Nice to know.
+1

@Sylvester:

I don't want to go off-topic, but how does it detect that at all?
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:19.


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