23 Nov, 2012, gauden wrote in the 1st comment:
Votes: 0
Hi,
sorry, but my english is very bad.

I've a problem. if I translate thee mud's exits in the file act_move.c, the areas's exits crash.

I do that:

in act_move.c I change:

[b]
char * const dir_name [] =
{
"north", "east", "south", "west", "up", "down",
"northeast", "northwest", "southeast", "southwest", "somewhere"
};
[/b]

char * const dir_name [] =
{
"norte", "este", "sur", "oeste", "arriba", "abajo",
"noreste", "noroeste", sureste", "suroeste", "algunsitio"
};


And i change to:



And i change to:

[code[b]
EXIT_DATA *find_door( CHAR_DATA *ch, char *arg, bool quiet )
{
EXIT_DATA *pexit;
int door;

if (arg == NULL || !str_cmp(arg,""))
return NULL;

pexit = NULL;
if ( !str_cmp( arg, "n" ) || !str_cmp( arg, "north" ) ) door = 0;
else if ( !str_cmp( arg, "e" ) || !str_cmp( arg, "east" ) ) door = 1;
else if ( !str_cmp( arg, "s" ) || !str_cmp( arg, "south" ) ) door = 2;
else if ( !str_cmp( arg, "w" ) || !str_cmp( arg, "west" ) ) door = 3;
else if ( !str_cmp( arg, "u" ) || !str_cmp( arg, "up" ) ) door = 4;
else if ( !str_cmp( arg, "d" ) || !str_cmp( arg, "down" ) ) door = 5;
else if ( !str_cmp( arg, "ne" ) || !str_cmp( arg, "northeast" ) ) door = 6;
else if ( !str_cmp( arg, "nw" ) || !str_cmp( arg, "northwest" ) ) door = 7;
else if ( !str_cmp( arg, "se" ) || !str_cmp( arg, "southeast" ) ) door = 8;
else if ( !str_cmp( arg, "sw" ) || !str_cmp( arg, "southwest" ) ) door = 9;
…[/b]

EXIT_DATA *find_door( CHAR_DATA *ch, char *arg, bool quiet )
{
EXIT_DATA *pexit;
int door;

if (arg == NULL || !str_cmp(arg,""))
return NULL;

pexit = NULL;
if ( !str_cmp( arg, "n" ) || !str_cmp( arg, "norte" ) ) door = 0;
else if ( !str_cmp( arg, "e" ) || !str_cmp( arg, "este" ) ) door = 1;
else if ( !str_cmp( arg, "s" ) || !str_cmp( arg, "sur" ) ) door = 2;
else if ( !str_cmp( arg, "o" ) || !str_cmp( arg, "oeste" ) ) door = 3;
else if ( !str_cmp( arg, "ar" ) || !str_cmp( arg, "arriba" ) ) door = 4;
else if ( !str_cmp( arg, "ab" ) || !str_cmp( arg, "abajo" ) ) door = 5;
else if ( !str_cmp( arg, "ne" ) || !str_cmp( arg, "noreste" ) ) door = 6;
else if ( !str_cmp( arg, "no" ) || !str_cmp( arg, "noroeste" ) ) door = 7;
else if ( !str_cmp( arg, "se" ) || !str_cmp( arg, "sureste" ) ) door = 8;
else if ( !str_cmp( arg, "so" ) || !str_cmp( arg, "suroeste" ) ) door = 9;


[/code]

In the file build.c:

[code]
[b]

char *const trap_flags[] = {
"room", "obj", "enter", "leave", "open", "close", "get", "put", "pick",
"unlock", "north", "south", "east", "west", "up", "down", "examine",
"northeast", "northwest", "southeast", "southwest", "r6", "r7", "r8",
"r9", "r10", "r11", "r12", "r13", "r14", "r15"
};

[/b]

char *const trap_flags[] = {
"room", "obj", "enter", "leave", "open", "close", "get", "put", "pick",
"unlock", "norte", "sur", "este", "oeste", "arriba", "abajo", "examine",
"noreste", "noroeste", "sureste", "suroeste", "r6", "r7", "r8",
"r9", "r10", "r11", "r12", "r13", "r14", "r15"
};[/code]

If I try use the foldarea comand or I try save changes on some area, the exists are changed, and i see two exits at the north, for example. the 1th north exit connect with the room 1000, but the 2th north exit connect with the room 1002. Originally, the 2th north exit was the west or east exit, for example.

Can you help me, please?
23 Nov, 2012, Rarva.Riendf wrote in the 2nd comment:
Votes: 0
I have a rev_dir constant as well do you have it ? It may explain.

#define MAX_DIR             6

short int const dir[] = {DIR_NORTH, DIR_EAST, DIR_SOUTH, DIR_WEST, DIR_UP, DIR_DOWN};
char * const dir_name[] = {"north", "east", "south", "west", "up", "down"};
char * const short_dir_name[] = {"n", "e", "s", "w", "u", "d"};
short int const rev_dir[] = {DIR_SOUTH, DIR_WEST, DIR_NORTH, DIR_EAST, DIR_DOWN, DIR_UP};

short int find_door(CHAR_DATA *ch, char *arg) {
short int door = get_direction_number(arg);
door = door == MAX_DIR ? -1 : door;
if (ch && ch->in_room) {
EXIT_DATA *pexit = ch->in_room->exit[door];
if (!pexit)
return -1;
}
return door;
}

short int get_direction_number(char *arg) {
short int i;
for (i = 0;i < MAX_DIR;i ++)
if ( !str_cmp(short_dir_name[i], arg) || !str_cmp(dir_name[i], arg))
return i;
return MAX_DIR;
}
23 Nov, 2012, Kayle wrote in the 3rd comment:
Votes: 0
gauden said:
[b]
char * const dir_name [] =
{
"north", "east", "south", "west", "up", "down",
"northeast", "northwest", "southeast", "southwest", "somewhere"
};
[/b]

char * const dir_name [] =
{
"norte", "este", "sur", "oeste", "arriba", "abajo",
"noreste", "noroeste", sureste", "suroeste", "algunsitio"
};


You missed a quotation mark. Should be:
char *	const	dir_name	[]		=
{
"norte", "este", "sur", "oeste", "arriba", "abajo",
"noreste", "noroeste", "sureste", "suroeste", "algunsitio"
};
23 Nov, 2012, Rarva.Riendf wrote in the 4th comment:
Votes: 0
This is detected as a syntax error in any editor worth its salt, so I doubt that is the problem. And I doubt it would compile anyway. He probably just copy pasted while editing it
23 Nov, 2012, gauden wrote in the 5th comment:
Votes: 0
Thanks very much :)

I translated the exit and the areas doesn't crash! :P
27 Nov, 2012, Gicker wrote in the 6th comment:
Votes: 0
Gauden si tiene cualquier pregunga siente libre enviarme un email a mi cuenta de mud gicker@d20mud.com. He sido haciendo programacion de MUDs por mas que 15 anos ahora, y me interesa la idea de mas MUDs hecho en espanol. Obviamente espanol no es mi primer idioma, entonces no puedo ayudar con traduccion, pero con preguntas de programacion estoy disponible para ayudarle.

Con mucho gusto,

Gicker
27 Jan, 2013, gauden wrote in the 7th comment:
Votes: 0
Hi,

Sorry, but i've other problem.

If I write a special character in my mud, the game doesn't acept it.
For example, If y type:
say daos
The mud responses:
You say, 'Daos'.

Other problem, is the next: I write a special character in the code, for example fight.c.
if( ch->skill_level[COMBAT_ABILITY] >= 1 )
sprintf( buf2, "%s Haces %d puntos de dao.", buf2, dam );


The mud don't show the leter . It shows:
Haces 3 puntos de daƱo.
If I use, for example, the leter , , , , , the mud responses with these simbols.

Can you help me? Again, sorry for my bad english's hability. :)
0.0/7