*Problemă:
Tipologie server(PvM / PvP):
*Resursă folosită: *Link exclusiv J4M*
*ServerFiles utilizat:
*Syserr:
Poză:
*Detalii suplimentare: Um, am pus si eu serverfiles-ul acela "just4metin" dar o mica nelamurire am . Are cineva idee de ce-mi arata .. ce-mi lipseste ... .de primesc warning-ul "unused variable "len_global" " cand pun chestia aia cu chat global? Este dupa tutorialul asta sursa/chat-global-numele-regatului-culoare-t10803.html si adaptat de mine pentru fiecare rank de admin in parte. Mentionez ca pe serverfiles-ul initial (probabil avea ceva script in plus) mergea fara nici o problema, testat tot, fara warning in sursa. Acum la compilare imi spune warning-ul ala. Nu cred ca afecteaza, dar pur si simplu nu inteleg de ce apare :/ avand in vedere ca doar am dat copy paste la cod ... (si da, am dat cum trebuie, ca m-am uitat atent)
Intrebare chat global
- SkyLine
-

- Mesaje: 2655
- Membru din: 12 Dec 2013, 23:37
- Server: Miraj2-Online
- Regat: Jinno
- Aprecieri: 520
- Mulţumiri: 987
- Discord: Copiază ID
- Contact:
- Titan
-

- Mesaje: 2783
- Membru din: 01 Iun 2015, 15:09
- Server: In curand.
- Regat: Chunjo
- Aprecieri: 42
- Mulţumiri: 377
- Rezolvări prob.: 3
- Discord: Copiază ID
- Contact:
Șterge
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "%s %s", kingdoms[ch->GetEmpire() - 1], chatbuf);și
const char* kingdoms[3] = { "|cFFff0000|H|h[Shinsoo]|cFFA7FFD4|H|h", "|cFFFFFF00|H|h[Chunjo]|cFFA7FFD4|H|h", "|cFF0080FF|H|h[Jinno]|cFFA7FFD4|H|h" }; împreună cu el. (Cel din urmă îl ștergi doar dacă nu cumva îl mai folosești prin altă funcție)- SkyLine
-

- Mesaje: 2655
- Membru din: 12 Dec 2013, 23:37
- Server: Miraj2-Online
- Regat: Jinno
- Aprecieri: 520
- Mulţumiri: 987
- Discord: Copiază ID
- Contact:
Mi-am pus inapoi codul pe care-l aveam eu initial, adaptatTitan scrie: ↑11 Sep 2019, 14:21 Ștergeint len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "%s %s", kingdoms[ch->GetEmpire() - 1], chatbuf);șiconst char* kingdoms[3] = { "|cFFff0000|H|h[Shinsoo]|cFFA7FFD4|H|h", "|cFFFFFF00|H|h[Chunjo]|cFFA7FFD4|H|h", "|cFF0080FF|H|h[Jinno]|cFFA7FFD4|H|h" };împreună cu el. (Cel din urmă îl ștergi doar dacă nu cumva îl mai folosești prin altă funcție)
Cod: Selectaţi tot
const int SHOUT_LIMIT_LEVEL = g_iUseLocale ? 15 : 3;
if (ch->GetLevel() < SHOUT_LIMIT_LEVEL)
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[System] Nu ai nivelul necesar pentru a folosi Chat-ul."), SHOUT_LIMIT_LEVEL);
return (iExtraLen);
}
if (thecore_heart->pulse - (int) ch->GetLastShoutPulse() < passes_per_sec * 15)
return (iExtraLen);
ch->SetLastShoutPulse(thecore_heart->pulse);
const char* kingdoms[3] = { "|cFFff0000|H|h[Shinsoo]|cFFA7FFD4|H|h", "|cFFFFFF00|H|h[Chunjo]|cFFA7FFD4|H|h", "|cFF0080FF|H|h[Jinno]|cFFA7FFD4|H|h" };
char chatbuf_global[CHAT_MAX_LEN + 1];
if (ch->GetGMLevel() > GM_PLAYER)
{
if (strncmp("SkyLine", ch->GetName(), 3) == 0)
{
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "|cFFFF0000Fondator Server|r [Lv. %d] [CH %d] %s : %s ", ch->GetLevel(), g_bChannel, ch->GetName(), buf);
}
else if (strncmp("[OwN]", ch->GetName(), 3) == 0)
{
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "|cFFFF0000Fondator Server|r [Lv. %d] [CH %d] %s : %s ", ch->GetLevel(), g_bChannel, ch->GetName(), buf);
}
else if (strncmp("[Admin]", ch->GetName(), 5) == 0)
{
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "|cFFFF4500Administrator Server|r [Lv. %d] [CH %d] %s : %s", ch->GetLevel(), g_bChannel, ch->GetName(), buf);
}
else if (strncmp("[MOD]", ch->GetName(), 3) == 0)
{
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "|cFF00FF00Moderator|r [Lv. %d] [CH %d] %s : %s", ch->GetLevel(), g_bChannel, ch->GetName(), buf);
}
else if (strncmp("[Help]", ch->GetName(), 4) == 0)
{
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "|cFFFFA500Helper|r [Lv. %d] [CH %d] %s : %s", ch->GetLevel(), g_bChannel, ch->GetName(), buf);
}
else if (strncmp("[Mr]", ch->GetName(), 2) == 0)
{
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "|cFF4682B4Mister|r [Lv. %d] [CH %d] %s : %s", ch->GetLevel(), g_bChannel, ch->GetName(), buf);
}
else if (strncmp("[Miss]", ch->GetName(), 4) == 0)
{
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "|cFFFF00FFMiss|r [Lv. %d] [CH %d] %s : %s", ch->GetLevel(), g_bChannel, ch->GetName(), buf);
}
else if (strncmp("[VIP]", ch->GetName(), 3) == 0)
{
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "|cFF00FFFFVIP|r [Lv. %d] [CH %d] %s : %s", ch->GetLevel(), g_bChannel, ch->GetName(), buf);
}
}
else
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), " %s [Lv. %d] [CH %d] %s", kingdoms[ch->GetEmpire() - 1], ch->GetLevel(), g_bChannel, chatbuf);
- Titan
-

- Mesaje: 2783
- Membru din: 01 Iun 2015, 15:09
- Server: In curand.
- Regat: Chunjo
- Aprecieri: 42
- Mulţumiri: 377
- Rezolvări prob.: 3
- Discord: Copiază ID
- Contact:
- SkyLine
-

- Mesaje: 2655
- Membru din: 12 Dec 2013, 23:37
- Server: Miraj2-Online
- Regat: Jinno
- Aprecieri: 520
- Mulţumiri: 987
- Discord: Copiază ID
- Contact:
Fisierul : https://www55.zippyshare.com/v/v45cUCZX/file.html
Output-ul :
Cod: Selectaţi tot
compile BattleArena.cpp
compile FSM.cpp
compile MarkConvert.cpp
compile MarkImage.cpp
compile MarkManager.cpp
compile OXEvent.cpp
compile TrafficProfiler.cpp
compile ani.cpp
compile arena.cpp
compile banword.cpp
compile battle.cpp
compile blend_item.cpp
compile block_country.cpp
compile buffer_manager.cpp
compile building.cpp
compile castle.cpp
compile char.cpp
compile char_affect.cpp
compile char_battle.cpp
compile char_change_empire.cpp
compile char_horse.cpp
compile char_item.cpp
compile char_manager.cpp
compile char_quickslot.cpp
compile char_resist.cpp
compile char_skill.cpp
compile char_state.cpp
compile PetSystem.cpp
compile cmd.cpp
compile cmd_emotion.cpp
compile cmd_general.cpp
compile cmd_gm.cpp
compile cmd_oxevent.cpp
compile config.cpp
compile constants.cpp
compile crc32.cpp
compile cube.cpp
compile db.cpp
compile desc.cpp
compile desc_client.cpp
compile desc_manager.cpp
compile desc_p2p.cpp
compile dungeon.cpp
compile empire_text_convert.cpp
compile entity.cpp
compile entity_view.cpp
compile event.cpp
compile event_queue.cpp
compile exchange.cpp
compile file_loader.cpp
compile fishing.cpp
compile gm.cpp
compile guild.cpp
compile guild_manager.cpp
compile guild_war.cpp
compile horse_rider.cpp
compile horsename_manager.cpp
compile input.cpp
compile input_auth.cpp
compile input_db.cpp
compile input_login.cpp
compile input_main.cpp
compile input_p2p.cpp
compile input_teen.cpp
compile input_udp.cpp
compile item.cpp
compile item_addon.cpp
compile item_attribute.cpp
compile item_manager.cpp
input_main.cpp: In member function 'int CInputMain::Chat(CHARACTER*, const char*, size_t)':
input_main.cpp:727: warning: unused variable 'len_global'
input_main.cpp:731: warning: unused variable 'len_global'
input_main.cpp:735: warning: unused variable 'len_global'
input_main.cpp:739: warning: unused variable 'len_global'
input_main.cpp:743: warning: unused variable 'len_global'
input_main.cpp:747: warning: unused variable 'len_global'
input_main.cpp:751: warning: unused variable 'len_global'
input_main.cpp:755: warning: unused variable 'len_global'
input_main.cpp:759: warning: unused variable 'len_global'
compile item_manager_idrange.cpp
compile locale.cpp
compile locale_service.cpp
compile log.cpp
compile login_data.cpp
compile lzo_manager.cpp
compile marriage.cpp
compile messenger_manager.cpp
compile mining.cpp
compile mob_manager.cpp
compile monarch.cpp
compile motion.cpp
compile over9refine.cpp
compile p2p.cpp
compile packet_info.cpp
compile party.cpp
compile polymorph.cpp
compile priv_manager.cpp
compile pvp.cpp
compile questevent.cpp
compile questlua.cpp
compile questlua_affect.cpp
compile questlua_arena.cpp
compile questlua_ba.cpp
compile questlua_building.cpp
compile questlua_danceevent.cpp
compile questlua_dungeon.cpp
compile questlua_forked.cpp
compile questlua_game.cpp
compile questlua_global.cpp
compile questlua_guild.cpp
compile questlua_horse.cpp
compile questlua_pet.cpp
compile questlua_item.cpp
compile questlua_marriage.cpp
compile questlua_mgmt.cpp
compile questlua_monarch.cpp
compile questlua_npc.cpp
compile questlua_oxevent.cpp
compile questlua_party.cpp
compile questlua_pc.cpp
compile questlua_quest.cpp
compile questlua_target.cpp
compile questmanager.cpp
compile questnpc.cpp
compile questpc.cpp
compile refine.cpp
compile regen.cpp
compile safebox.cpp
compile sectree.cpp
compile sectree_manager.cpp
compile sequence.cpp
compile shop.cpp
compile skill.cpp
compile start_position.cpp
compile target.cpp
compile text_file_loader.cpp
compile trigger.cpp
compile utils.cpp
compile vector.cpp
compile war_map.cpp
compile wedding.cpp
compile xmas_event.cpp
compile panama.cpp
compile version.cpp
compile threeway_war.cpp
compile map_location.cpp
compile BlueDragon.cpp
compile BlueDragon_Binder.cpp
compile DragonLair.cpp
compile questlua_dragonlair.cpp
compile skill_power.cpp
compile affect.cpp
compile FileMonitor_FreeBSD.cpp
compile ClientPackageCryptInfo.cpp
compile cipher.cpp
compile buff_on_attributes.cpp
compile dragon_soul_table.cpp
compile DragonSoul.cpp
compile group_text_parse_tree.cpp
compile char_dragonsoul.cpp
compile questlua_dragonsoul.cpp
compile shop_manager.cpp
compile shopEx.cpp
compile item_manager_read_tables.cpp
compile minilzo.c
linking ../game
- Titan
-

- Mesaje: 2783
- Membru din: 01 Iun 2015, 15:09
- Server: In curand.
- Regat: Chunjo
- Aprecieri: 42
- Mulţumiri: 377
- Rezolvări prob.: 3
- Discord: Copiază ID
- Contact:
- SkyLine
-

- Mesaje: 2655
- Membru din: 12 Dec 2013, 23:37
- Server: Miraj2-Online
- Regat: Jinno
- Aprecieri: 520
- Mulţumiri: 987
- Discord: Copiază ID
- Contact:
Lol, nu stiu cum naiba am dat char_item-ul, wtf ...
https://www28.zippyshare.com/v/uoU6KJ5H/file.html
https://www89.zippyshare.com/v/h9HMr7qP/file.html
Vezi daca mai apare.
Vezi daca mai apare.
- Athero
-

- Mesaje: 3936
- Membru din: 17 Aug 2017, 00:08
- Aprecieri: 559
- Mulţumiri: 7142
- Discord: Copiază ID
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 66 vizitatori


daca te-am ajutat
de