Jump to content
×
×
  • Create New...
  • 0

[string.format()]fail


Syreldar

Question

Hello everyone, 

 

I've got problems with string.format, it don't work, and i can't explain why.

 

an example:

 

Quest: 

Hidden Content

    Give reaction to this post to see the hidden content.

 

Fail screen: 

Hidden Content

    Give reaction to this post to see the hidden content.

 

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
Share on other sites

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
Share on other sites

  • 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

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
Share on other sites

  • 0

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
Share on other sites

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


  • Read our Rules
  • Activity

    1. 0

      Need help with a small function

    2. 0

      How to Delay quest

    3. 0

      After choosing a character, it throws it at the login screen.

    4. 0

      Bonus Board Official like

    5. 0

      [ERROR] unfinished string , ranking quest .

    6. 0

      experience 0

  • Recently Browsing

    • No registered users viewing this page.

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.