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

Problem with \n LUA


Krixius

Question

Hi friends.

Actually i has a problem with \n in i/o files in a quest.

 

quest:

With \t works:

	local file = io.open("/usr/home/mt2/share/locale/logs/itemshop/"..pc.get_account().."/"..pc.get_name()..".txt", "a+")
	file:write("ID Jugador:\t"..pc.get_player_id().."\tNombre Jugador:\t"..pc.get_name().."\tFecha:\t"..os.date("%c").."\tCoins Gastadas: "..coins.."\tCoins Restantes: "..dr2[1].cash.."\t")
	file:close()

 

With \n not works:

	local file = io.open("/usr/home/mt2/share/locale/logs/itemshop/"..pc.get_account().."/"..pc.get_name()..".txt", "a+")
	file:write("ID Jugador:\t"..pc.get_player_id().."\tNombre Jugador:\t"..pc.get_name().."\tFecha:\t"..os.date("%c").."\tCoins Gastadas: "..coins.."\tCoins Restantes: "..dr2[1].cash.."\n")
	file:close()

error: 

d7edeac615.jpg

 

Why?

:D

Link to comment
  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

2 answers to this question

Recommended Posts

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


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.