AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problems with register_dictionary (https://forums.alliedmods.net/showthread.php?t=46392)

Silencer123 10-25-2006 14:29

Problems with register_dictionary
 
A Part from plugin_init():
Code:
register_dictionary("nsrtsys.txt") register_concmd("say -rtsys","RTSYS_Information",-1,LANG_CMDIN)
Error: Undefined Symbol "LANG_CMDIN".
The nsrtsys.txt in the lang Folder (Note that all Languages except German use same as English):
Code:

[en]
LANG_CMDIN = - Information
LANG_INTRO = RTSYS %s!^nSay -rtsys for Information.
LANG_INFOX = Diddle di daddle di doo.

[de]
LANG_CMDIN = - Informationen
LANG_INTRO = RTSYS %s!^nSay -rtsys für Informationen.
LANG_INFOX = Doodle dee noodle dee doo.

[sr]
LANG_CMDIN = - Information
LANG_INTRO = RTSYS %s!^nSay -rtsys for Information.
LANG_INFOX = Diddle di daddle di doo.

[tr]
LANG_CMDIN = - Information
LANG_INTRO = RTSYS %s!^nSay -rtsys for Information.
LANG_INFOX = Diddle di daddle di doo.

[fr]
LANG_CMDIN = - Information
LANG_INTRO = RTSYS %s!^nSay -rtsys for Information.
LANG_INFOX = Diddle di daddle di doo.

[sv]
LANG_CMDIN = - Information
LANG_INTRO = RTSYS %s!^nSay -rtsys for Information.
LANG_INFOX = Diddle di daddle di doo.

[da]
LANG_CMDIN = - Information
LANG_INTRO = RTSYS %s!^nSay -rtsys for Information.
LANG_INFOX = Diddle di daddle di doo.

[pl]
LANG_CMDIN = - Information
LANG_INTRO = RTSYS %s!^nSay -rtsys for Information.
LANG_INFOX = Diddle di daddle di doo.

[nl]
LANG_CMDIN = - Information
LANG_INTRO = RTSYS %s!^nSay -rtsys for Information.
LANG_INFOX = Diddle di daddle di doo.

[es]
LANG_CMDIN = - Information
LANG_INTRO = RTSYS %s!^nSay -rtsys for Information.
LANG_INFOX = Diddle di daddle di doo.

[bp]
LANG_CMDIN = - Information
LANG_INTRO = RTSYS %s!^nSay -rtsys for Information.
LANG_INFOX = Diddle di daddle di doo.

[cz]
LANG_CMDIN = - Information
LANG_INTRO = RTSYS %s!^nSay -rtsys for Information.
LANG_INFOX = Diddle di daddle di doo.

[fi]
LANG_CMDIN = - Information
LANG_INTRO = RTSYS %s!^nSay -rtsys for Information.
LANG_INFOX = Diddle di daddle di doo.

[ls]
LANG_CMDIN = - Information
LANG_INTRO = RTSYS %s!^nSay -rtsys for Information.
LANG_INFOX = Diddle di daddle di doo.

[bg]
LANG_CMDIN = - Information
LANG_INTRO = RTSYS %s!^nSay -rtsys for Information.
LANG_INFOX = Diddle di daddle di doo.


teame06 10-25-2006 14:37

Re: Problems with register_dictionary
 
It doesn't work like that. If your going to use ML in a register_concmd you have to do the formating first.

Code:
new what[64] format(what, 63, "%L", LANG_SERVER, "LANG_CMDIN") register_concmd("say -rtsys","RTSYS_Information",-1, what)

This will only display all the information into the server language. So if you are trying to show it for the player language when they use the command. It will not work for that purpose.

Nostrodamous 10-25-2006 16:36

Re: Problems with register_dictionary
 
yes the other ways to do it are
Code:
format(menu , 191, "%L", id, "HELLO");   or   format(menu,192, "%L" , LANG_PLAYER, "HELLO");   and   format(menu,192,"%L", LANG_SERVER,"HELLO"); }

pretty self explanatory :up:

teame06 10-25-2006 17:38

Re: Problems with register_dictionary
 
And your an idiot raphero. Pretty much self explanatory

Code:
register_clcmd ( const client_cmd[],const function[],flags=-1, info[]="" ) register_srvcmd ( const server_cmd[],const function[],flags=-1, info[]="" ) register_concmd ( const client_cmd[],const function[],flags=-1, info[]="" )

register_concmd, srvcmd, clcmd store only one string in it info[]. So using LANG_PLAYER and id (where the hell do you get id in plugin_init) will not work for this purpose he was trying to do. register command native weren't made for the purpose of ML.

Silencer123 10-26-2006 09:35

Re: Problems with register_dictionary
 
Code:
public tell_player_plugins_version(id) {     new szMsg[180]     format(szMsg,179,"%L",id,"LANG_INTRO",VERSION)     client_print(id,print_chat,szMsg)     // Is this correct?     // Must/Should the L be capital?     // Is 'VERSION' at the correct Position?     // Will "ö","ä" and "ü" work? They do in NS, but do they do so via AMXX? }

Rolnaaba 10-26-2006 09:45

Re: Problems with register_dictionary
 
Code:
register_clcmd ( const client_cmd[],const function[],flags=-1, info[]="" ) register_concmd ( const client_cmd[],const function[],flags=-1, info[]="" )
what is difference between concmd and clcmd teame06?

teame06 10-26-2006 12:26

Re: Problems with register_dictionary
 
Quote:

Originally Posted by Silencer123 (Post 395409)
Code:
public tell_player_plugins_version(id) {     new szMsg[180]     format(szMsg,179,"%L",id,"LANG_INTRO",VERSION)     client_print(id,print_chat,szMsg)     // Is this correct?     // Must/Should the L be capital?     // Is 'VERSION' at the correct Position?     // Will "ö","ä" and "ü" work? They do in NS, but do they do so via AMXX? }

You can't be using direct buffer in client_print. You need to do client_print(id, print_chat, "%s", szMsg); . Yes VERSION Is at the correct poistion if it is an string. I'm not sure about those "ö", etc.. %L << L has to be capitalized I believe

Quote:

Originally Posted by Rolnaaba (Post 395413)
Code:
register_clcmd ( const client_cmd[],const function[],flags=-1, info[]="" ) register_concmd ( const client_cmd[],const function[],flags=-1, info[]="" )
what is difference between concmd and clcmd teame06?

When you register a console command It will work in the client console and server console. When you register a client command it will only work in the client console.

Silencer123 10-26-2006 14:06

Re: Problems with register_dictionary
 
okay thanks i will try it.


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

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