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

Solved Question about language file syntax


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pengi
Junior Member
Join Date: May 2020
Location: California
Old 05-15-2020 , 07:46   Question about language file syntax
Reply With Quote #1

I am running WC3FT v3.0 RC14 with AMXX v1.9

I am getting an "ML_NOTFOUND WAR3HELP" instead of a nice display of commands to help players.



I found in the motd.inl how the war3help is structured and it lines up with what's in game.
Code:
public MOTD_War3help(id)
{

	if ( !WC3_Check( id ) )
	{
		return;
	}


	// Get the game title
	new szGame[32];
	get_modname( szGame, 31 );

	new pos = 0;

	// Add header
	pos += formatex( szTmpMsg[pos], 2047-pos, "%s", MOTD_header );

	// Add the content
	pos += formatex( szTmpMsg[pos], 2047-pos, "%L<br>"	, id, "MOTD_DEVELOPED_BY" );
	pos += formatex( szTmpMsg[pos], 2047-pos, "%L<br>"	, id, "MOTD_CLICK_FOR_LATEST" );
	pos += formatex( szTmpMsg[pos], 2047-pos, "%L<p>"	, id, "MOTD_MORE_INFO", szGame );
	pos += formatex( szTmpMsg[pos], 2047-pos, "%L"		, id, "WAR3HELP" );
	
	// Set up the title
	new szTitle[128];
	formatex( szTitle, 127, "%L", id, "WAR3HELP_TITLE" );

	show_motd( id, szTmpMsg, szTitle );

	return;
}
The words in quotes (above) tie to words in the language file war3ft.txt (below)

Code:
MOTD_DEVELOPED_BY = Warcraft 3 Frozen Throne was developed by Geesu (also known as Pimp Daddy and OoTOAoO)
MOTD_CLICK_FOR_LATEST = Click <a href="http://www.war3ft.com">here</a> for the latest information and updates
MOTD_MORE_INFO = Click <a href="http://war3ft.com/online/war3info.php?game=%s">here</a> for more information regarding the races
WAR3HELP_TITLE = Warcraft 3 Frozen Throne Help

WAR3HELP :
This is how you bind a key<p>
1) Type ` to get to the console (key to the left of number 1)<br>
2) Type bind alt ultimate<br>
3) Type bind - shopmenu<br>
4) Type bind = shopmenu2<br>
5) Type bind p ability<p>
There are a few commands you need to know in order take full advantage of the plugin<p>
say /selectskill - Allows you to select skills before the start of the next round<br>
say /changerace - Allows you to change your race<br>
say /playerskills - Shows you what skills other players have chosen<br>
say /skillsinfo - Shows you what each skill does for the race you have selected<br>
say /itemsinfo - Shows you a list of items and what they do<br>
say /itemsinfo2 - Shows you more items<br>
say /level - Shows you what race, level and skills you have<br>
say /war3menu -  Shows the War3 Frozen Throne Player menu<br>
say /ability - if you have serpent wards it will plant them<br>
say /resetskills - resets your skills<br>		
say /resetxp - Will reset your level and XP to 0

:
I did a test by setting "WAR3HELP = Hello", which gave no error in the motd. It properly showed the WAR3HELP as "Hello" in-game.

Does the ":" syntax not work with AMXX v1.9 language files the same way it worked in v1.8.2? To be fair I am not even sure it has anything to do with AMXX, but I thought it might.
Asking here before I go through reinstalling the previous version of AMXX again.

Last edited by pengi; 05-16-2020 at 05:00.
pengi is offline
elmedin
Senior Member
Join Date: Nov 2013
Location: Bruh
Old 05-15-2020 , 12:40   Re: Question about language file syntax
Reply With Quote #2

Check if ur txt file is saved on latin or utf-8 if its on utf-8 switch it to latin and recheck if its working
elmedin is offline
pengi
Junior Member
Join Date: May 2020
Location: California
Old 05-15-2020 , 17:03   Re: Question about language file syntax
Reply With Quote #3

Quote:
Originally Posted by elmedin View Post
Check if ur txt file is saved on latin or utf-8 if its on utf-8 switch it to latin and recheck if its working
I'm not positive I know what you mean, but I gave it a try.

I opened the war3ft.txt in notepad, went to "Save As...", selected the ANSI encoding from the drop down menu, and saved it. I reloaded the server and the motd was still giving me the same issue with ML_NOTFOUND.

I ran a powershell script to get the encoding of the .txt files and this is what it returned (war3ft.txt at the bottom):
Code:
Encoding                  Path                                                                 
--------                  ----                                                                 
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\admin.txt       
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\adminchat.txt   
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\admincmd.txt    
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\adminhelp.txt   
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\adminslots.txt  
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\adminvote.txt   
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\antiflood.txt   
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\cmdmenu.txt     
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\common.txt      
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\imessage.txt    
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\languages.txt   
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\mapchooser.txt  
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\mapsmenu.txt    
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\menufront.txt   
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\miscstats.txt   
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\multilingual.txt
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\nextmap.txt     
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\pausecfg.txt    
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\plmenu.txt      
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\restmenu.txt    
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\scrollmsg.txt   
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\statscfg.txt    
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\statsx.txt      
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\stats_dod.txt   
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\telemenu.txt    
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\time.txt        
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\timeleft.txt    
System.Text.ASCIIEncoding C:\SteamCMD\servers\cstrike\addons\amxmodx\data\lang\war3ft.txt
Is this what you meant by switching it to Latin?
pengi is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 05-15-2020 , 17:29   Re: Question about language file syntax
Reply With Quote #4

That seems more like a motd limitation rather than AMXX one.
__________________
Spirit_12 is offline
pengi
Junior Member
Join Date: May 2020
Location: California
Old 05-15-2020 , 18:53   Re: Question about language file syntax
Reply With Quote #5

So I went ahead and reverted back to AMXX 1.8.2 without changing anything else and it fixed itself.

While it is fixed, it's not exactly solved. Anyone know why this would happen?
pengi is offline
elmedin
Senior Member
Join Date: Nov 2013
Location: Bruh
Old 05-15-2020 , 19:13   Re: Question about language file syntax
Reply With Quote #6

Maybe because war3ft is outdated who knows
elmedin is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-15-2020 , 20:57   Re: Question about language file syntax
Reply With Quote #7

You should use a real source code editor like Notepad++, never use Notepad. Then you can change the encoding to "UTF-8 without BOM" (this is the only encoding that you'll ever need with AMX Mod X).

It's certainly possible that you discovered a bug in 1.9. You could try 1.10 to see if it's till an issue there so that you can be sure that it's still an issue in the current development version of AMX Mod X.


EDIT:

Looking at the code, it looks like the functionality is meant to be in there but it looks like they refactored how they read the file since 1.8.2 so it's not unlikely that something broke.
__________________

Last edited by fysiks; 05-15-2020 at 21:44.
fysiks is offline
pengi
Junior Member
Join Date: May 2020
Location: California
Old 05-16-2020 , 04:57   Re: Question about language file syntax
Reply With Quote #8

I use Notepad++ almost always, but I was unsure if the encoding was doing anything when I clicked it. It felt very finicky when I would choose an encoding, then reopen the file and it wasn't really showing the encoding I chose just a second earlier.

Went ahead and loaded up v1.10 on my server and got the same error. So it seems it's still a bug in the current build. Not sure where to report the bug though.

This is basically solved with fysiks input. How can I mark it solved?
pengi is offline
elmedin
Senior Member
Join Date: Nov 2013
Location: Bruh
Old 05-16-2020 , 04:58   Re: Question about language file syntax
Reply With Quote #9

Edit ur post on advanced, and look at ur title on ur left u will see the prefix, and u switch the prefix to Solved
elmedin is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-16-2020 , 07:29   Re: Question about language file syntax
Reply With Quote #10

Quote:
Not sure where to report the bug though.
https://github.com/alliedmodders/amxmodx/issues
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 09:44.


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