Premium Syreldar 1890 Posted May 16, 2014 Premium Share Posted May 16, 2014 (edited) Hello everyone, I've got problems with string.format, it don't work, and i can't explain why. an example: Quest: http://puu.sh/8NYD8.quest Fail screen: https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif Why? Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 2 2 1 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Risan 115 Posted May 16, 2014 Share Posted May 16, 2014 Your String is correct but i have no idea why is not works... test this; --[[quest guild_ranking 2006 riscritta decentemente da nabbhacker per newage2]] quest guild_ranking begin state start begin when 11000.chat."Andamento della tua Gilda" or 11002.chat."Andamento della tua Gilda" or 11004.chat."Andamento della tua Gilda" begin local name = mob_name(npc.get_race())..":" say_title(name) say("Classifica:[DELAY value;0]"); say(" | Nome | Punti | Vit. | Sconfitte | Pareggi "); say(guild.around_ranking_string().."[/DELAY]") wait() say_title(name) say("Prestazioni della tua Gilda ed informazioni:[ENTER]") --don't work begin --[[ say(string.format("Nome Gilda:%s ;", guild.get_name())) say(string.format("Livello:%d ;", guild.get_level())) say(string.format("Numero Membri:%d ;", guild.get_member_count())) say(string.format("Guerre Combattute:%d: ;", guild.get_any_war())) say(string.format("Posizione Classifica:%d ;", guild.get_rank())) ]] say("Nome Gilda: "..guild.get_name().."") say("Livello: "..guild.get_level().."") say("Numero Membri: "..guild.get_member_count().."") say("Guerre Combattute: "..guild.get_any_war().."") say("Posizione Classifica: "..guild.get_rank().."") --don't work end end -- when when 11000.chat."Andamento Top Gilde" or 11002.chat."Andamento Top Gilde" or 11004.chat."Andamento Top Gilde" begin local name = mob_name(npc.get_race())..":" say_title(name) say("Classifica:[DELAY value;0]"); say(" | Nome | Punti | Vit. | Sconfitte | Pareggi "); say(guild.high_ranking_string().."[/DELAY]") end -- when end -- state end -- quest 1 Link to comment Share on other sites More sharing options...
Premium Syreldar 1890 Posted May 16, 2014 Author Premium Share Posted May 16, 2014 Your String is correct but i have no idea why is not works... test this; --[[quest guild_ranking 2006 riscritta decentemente da nabbhacker per newage2]] quest guild_ranking begin state start begin when 11000.chat."Andamento della tua Gilda" or 11002.chat."Andamento della tua Gilda" or 11004.chat."Andamento della tua Gilda" begin local name = mob_name(npc.get_race())..":" say_title(name) say("Classifica:[DELAY value;0]"); say(" | Nome | Punti | Vit. | Sconfitte | Pareggi "); say(guild.around_ranking_string().."[/DELAY]") wait() say_title(name) say("Prestazioni della tua Gilda ed informazioni:[ENTER]") --don't work begin --[[ say(string.format("Nome Gilda:%s ;", guild.get_name())) say(string.format("Livello:%d ;", guild.get_level())) say(string.format("Numero Membri:%d ;", guild.get_member_count())) say(string.format("Guerre Combattute:%d: ;", guild.get_any_war())) say(string.format("Posizione Classifica:%d ;", guild.get_rank())) ]] say("Nome Gilda: "..guild.get_name().."") say("Livello: "..guild.get_level().."") say("Numero Membri: "..guild.get_member_count().."") say("Guerre Combattute: "..guild.get_any_war().."") say("Posizione Classifica: "..guild.get_rank().."") --don't work end end -- when when 11000.chat."Andamento Top Gilde" or 11002.chat."Andamento Top Gilde" or 11004.chat."Andamento Top Gilde" begin local name = mob_name(npc.get_race())..":" say_title(name) say("Classifica:[DELAY value;0]"); say(" | Nome | Punti | Vit. | Sconfitte | Pareggi "); say(guild.high_ranking_string().."[/DELAY]") end -- when end -- state end -- quest already tested it, same result. "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Risan 115 Posted May 16, 2014 Share Posted May 16, 2014 test this; guild.get_name(guild.get_id ? ()) i test this later... sry and now i go sleeping ^^ 1 Link to comment Share on other sites More sharing options...
Solution metin2team 766 Posted May 16, 2014 Solution Share Posted May 16, 2014 Don't forget that.. when 11000.chat."Andamento della tua Gilda" ... with pc.hasguild() begin guild.get_name(pc.get_guild()) 1 Link to comment Share on other sites More sharing options...
Premium Syreldar 1890 Posted May 16, 2014 Author Premium Share Posted May 16, 2014 Thank guys, it works, i forgot to put pc.get_guild() inside guild.get_name(). "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now