Jump to content
  • 0

[string.format()]fail


Syreldar

Question

  • Developer

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: http://puu.sh/8NYjN.jpg

 

Why?

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to comment

5 answers to this question

Recommended Posts

  • 0

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
  • Love 1
Link to comment
  • 0
  • Developer

 

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.

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to comment
  • 0
  • Developer

Thank guys, it works, i forgot to put pc.get_guild() inside guild.get_name().

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.