Oggi è 28/03/2024, 16:50



Apri un nuovo argomento Rispondi all’argomento  [ 15 messaggi ]  Vai alla pagina Precedente  1, 2
Autore Messaggio
 Oggetto del messaggio: Re: come si fa ad inserire diverse lingue in lyonesse mud
MessaggioInviato: 18/02/2016, 21:09  
Avatar utente

Iscritto il: 13/01/2010, 12:02
Messaggi: 31
Località: Roma
Mud: Dei delle Ere
Non connesso

tgmud ha scritto:
provando a fare qualche piccola sostituzione gli errori da 4 sono passati ad u2 e poi sul sugerimento ho messo questo codice

for (tch = ch->in_room->people; tch; tch = tch->next_in_room) e gli errori ne e soltando uno

che nel codice di seguito

void garble_text(char *string, int percent)
{ (errore)
char letters[] = "aeiousthpwxyz";
int i;

for (i = 0; i < strlen(string); ++i)
if (isalpha(string[i]) && number(0, 1) && number(0, 100) > percent)
string[i] = letters[number(0, 12)];
}

nel dettaglio l errore ('garble_text' : redefinition; different basic types) che si riferisce alla parentesi dels econdo rigo

come risolvere questo ultimo errore?:P


come ti dicevo dal dettaglio dell'errore sembra come se c'è già una definizione di garble_text nel codice ma che non ha (char*, int) come argomenti o che non ritorna un void.
Prova a fare una ricerca a tappeto in tutto il codice della parola garble_text e vedi se è sempre uguale.
Inoltre ti consiglierei di mettere la definizione all'inizio del file
void garble_text (char* string, int percent);

_________________
Advanced Dei delle Ere - coder


Top
 Profilo  
 
 Oggetto del messaggio: Re: come si fa ad inserire diverse lingue in lyonesse mud
MessaggioInviato: 25/02/2016, 23:25  
Iscritto il: 05/11/2010, 23:57
Messaggi: 23
Mud: Vagabondo
Non connesso

\src\act.comm.c(72): /*garble_text(ibuf, GET_SKILL(ch, SPEAKING(ch))); (primo errore che mi segnala e in questa riga garble_text(ibuf, GET_SKILL(ch, SPEAKING(ch)));
\src\act.comm.c(79): /*garble_text(obuf, GET_SKILL(tch, SPEAKING(ch))); secondo errore garble_text(obuf, GET_SKILL(tch, SPEAKING(ch)));
\src\act.comm.c(93):void garble_text(char string, int percent) terzo errore void garble_text(char string, int percent)


cioe non sono errori volevo dire questi sono tutti i barble:P
poi ho messo questo pezzo di codice al inizio dei file /**************************************************************************
# # # ## # # ### ## ## ### http://www.lyonesse.it
# # # # # ## # # # # #
# # # # # ## ## # # ## ## ## # # ##
# # # # # ## # # # # # # # # # # #
### # ## # # ### ## ## ### # # #### ## Ver. 1.0

-Based on CircleMud & Smaug- Copyright (c) 2001-2002 by Mithrandir

******************************************************************** /
/ ***********************************************************************
File: act.comm.c Part of CircleMUD
Usage: Player-level communication commands

All rights reserved. See license.doc for complete information.

Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
*********************************************************************** /

#include "conf.h"
#include "sysdep.h"


#include "structs.h"
#include "utils.h"
#include "comm.h"
#include "interpreter.h"
#include "handler.h"
#include "db.h"
#include "screen.h"
#include "clan.h"

/ extern variables /
extern int level_can_shout;
extern int holler_move_cost;

/ local functions /
void garble_text (char* string, int percent);
void perform_tell(CHAR_DATA ch, CHAR_DATA vict, char *arg);
int is_tell_ok(CHAR_DATA ch, CHAR_DATA vict);
ACMD(do_say);
ACMD(do_gsay);
ACMD(do_tell);
ACMD(do_reply);
ACMD(do_spec_comm);
ACMD(do_write);
ACMD(do_page);
ACMD(do_gen_comm);
ACMD(do_qcomm);
ACMD(do_lang_say);
ACMD(do_languages);



/*ACMD(do_lang_say)
ciao

\src\utils.h(460):#define GET_SKILL(ch, i) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->skills[i]))
\src\act.comm.c(73): /*garble_text(ibuf, GET_SKILL(ch, SPEAKING(ch)));
src\act.comm.c(80): /*garble_text(obuf, GET_SKILL(tch, SPEAKING(ch)));
src\act.comm.c(82): if (GET_SKILL(tch, SPEAKING(ch)) < 1)
\src\class.c(1773): //if (!GET_SKILL(ch, SKILL_CONTROL_WEATHER))
\src\class.c(1773): //if (!GET_SKILL(ch, SKILL_CONTROL_WEATHER))
\src\fight.c(1741): learned = GET_SKILL(ch, type);
\src\magic2.c(739): if (GET_SKILL(ch, spellnum) >= LEARNED(ch))
\src\obj_trap.c(304): if (!GET_SKILL(ch, SKILL_DISARM_TRAPS))
\src\save.c(302): GET_SKILL(ch, sn) = fread_number(fp);

#define GET_SKILL(ch, i) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->skills[i]))
#define SET_SKILL(ch, i, pct) do { CHECK_PLAYER_SPECIAL((ch), (ch)->player_specials->skills[i]) = pct; } while(0)


in questi giorni ho fatto qualche ricerca su stao pezzo di codice csempre sulle lingue forse sta qui l errore un altro poco e e si risolve sta cosa che si deve fa piu uindi?:P


Top
 Profilo  
 
 Oggetto del messaggio: Re: come si fa ad inserire diverse lingue in lyonesse mud
MessaggioInviato: 26/02/2016, 1:27  
Avatar utente

Iscritto il: 13/01/2010, 12:02
Messaggi: 31
Località: Roma
Mud: Dei delle Ere
Non connesso

SE hai copiato giusto, il terzo garble_text manca di un * dopo char
void garble_text(char string, int percent)
dovrebbe essere
void garble_text(char* string, int percent)

_________________
Advanced Dei delle Ere - coder


Top
 Profilo  
 
 Oggetto del messaggio: Re: come si fa ad inserire diverse lingue in lyonesse mud
MessaggioInviato: 27/02/2016, 3:18  
Iscritto il: 05/11/2010, 23:57
Messaggi: 23
Mud: Vagabondo
Non connesso

ciao ho controlato sembra tutto apposto guarda

/**/ACMD(do_lang_say)
{
extern char *languages[];
char ibuf[MAX_INPUT_LENGTH];
char obuf[MAX_INPUT_LENGTH];
int ofs = 190; /* offset - should be first language */
struct char_data *tch;

skip_spaces(&argument);

if(!*argument) {
send_to_char("Say what?\r\n", ch);
return;
}

strcpy(ibuf, argument); /* preserve original text */

garble_text(ibuf, GET_SKILL(ch, SPEAKING(ch)));

for (tch = ch->in_room->people; tch; tch = tch->next_in_room) {
if (tch != ch && AWAKE(tch) && tch->desc) {

strcpy(obuf, ibuf); /* preserve the first garble */

garble_text(obuf, GET_SKILL(tch, SPEAKING(ch)));

if (GET_SKILL(tch, SPEAKING(ch)) < 1)
sprintf(buf, "$n says, in an unfamiliar tongue,\r\n '%s'", obuf);
else
sprintf(buf, "$n says, in the %s tongue,\r\n '%s'", languages[(SPEAKING(ch) - ofs)], obuf);
act(buf, TRUE, ch, 0, tch, TO_VICT);
}
}

sprintf(buf, "You say, in the %s tongue,\r\n '%s'", languages[(SPEAKING(ch)- ofs)], argument);
act(buf, TRUE, ch, 0, 0, TO_CHAR);

}
void garble_text(char* string, int percent)
{
char letters[] = "aeiousthpwxyz";
int i;

for (i = 0; i < strlen(string); ++i)
if (isalpha(string[i]) && number(0, 1) && number(0, 100) > percent)
string[i] = letters[number(0, 12)];
}

cmq mi da sempre sti 1 due errori qui guarda

------ Build started: Project: Lyonesse, Configuration: Debug Win32 ------
Linking...
act.comm.obj : error LNK2019: unresolved external symbol _SPEAKING referenced in function _do_lang_say
bin/Lyonesse.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Users\\Debug\BuildLog.htm"
Lyonesse - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

ma spero che siamo vicni alla risoluzione che manca piu per far funzionare il codice?:P


Top
 Profilo  
 
 Oggetto del messaggio: Re: come si fa ad inserire diverse lingue in lyonesse mud
MessaggioInviato: 04/03/2016, 12:18  
Avatar utente

Iscritto il: 13/01/2010, 12:02
Messaggi: 31
Località: Roma
Mud: Dei delle Ere
Non connesso

_SPEAKING ?
Strano quell' _ all'inizio

_________________
Advanced Dei delle Ere - coder


Top
 Profilo  
 
Visualizza ultimi messaggi:  Ordina per  
Apri un nuovo argomento Rispondi all’argomento  [ 15 messaggi ]  Vai alla pagina Precedente  1, 2

Tutti gli orari sono UTC + 1 ora [ ora legale ]


Chi c’è in linea

Visitano il forum: Nessuno e 1 ospite


Non puoi aprire nuovi argomenti
Non puoi rispondere negli argomenti
Non puoi modificare i tuoi messaggi
Non puoi cancellare i tuoi messaggi

Cerca per:
Vai a:  
cron

World of Warcraft phpBB template "WoWMoonclaw" created by MAËVAH (ex-MOONCLAW) (v3.0.4) - wowcr.net : World of Warcraft styles & videos
© World of Warcraft and Blizzard Entertainment are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries. wowcr.net is in no way associated with Blizzard Entertainment.