Is there a limit for arrays?
#1

Hello! I'd like to make my server multilanguage.

I decided to make few mysql tables for the language (Table name: xy_lang Fields: key, value), and load their data to an array in SA-MP.

Code:
enum langInfo{
	KICK_MSG[],
	BAN_MSG[],
	JOIN_MSG[],
	etc...
}; 
new Language[MAX_LANGUAGE][langInfo];
and use it like SendClientMessage(playerid, -1, Language[LANGUAGE_INDEX][KICK_MSG]);

My question is that the enumeration have a maximum limit or i can pass all the in-game texts in it? ex 3-4000 elements.

Is it possible? Is there any easy way to make this?

We have a complete list of one language right now in pawn code like:

Code:
new 
	SQL_CONNECTION_STARTED[] = "SQL Connection was successful!",	

	PLAYER_JOINED_SERVER[] = "%s has joined the server.",
	PLAYER_LEFT_SERVER[] = "%s has left the server.",
	PLAYER_KICKED_SERVER_MSG[] = "%s has been kicked from the server by %s.",
This can be reusable in any other languages? How to?

Thanks!
Reply


Messages In This Thread
Is there a limit for arrays? - by AnthonyGates - 03.04.2019, 19:35
Re: Is there a limit for arrays? - by SymonClash - 03.04.2019, 19:50
Re: Is there a limit for arrays? - by AnthonyGates - 04.04.2019, 17:24
Re: Is there a limit for arrays? - by AnthonyGates - 07.04.2019, 18:12
Re: Is there a limit for arrays? - by AnthonyGates - 07.04.2019, 18:44

Forum Jump:


Users browsing this thread: 1 Guest(s)