Jump to content

Recommended Posts

Posted

Bueno, es una quest sencilla con mysql_query, pasa que no me dice el say, yo supongo que lo tengo correcto.

Mysql_query en el questlib.lua, por supuesto. Solo necesito saber si esta bien o no.

 

Gracias.

 

quest teste begin
state start begin
	when 20094.chat."Meu id" begin
		local id = mysql_query("SELECT account_id FROM player.player WHERE name ='"..pc.get_name().."'")
		say("Teu id é "..id)
	end
end
end

Posted

Quizá diga una tontería y es muy probable pero prueba así:

quest teste begin
	    state start begin
local id = mysql_query("SELECT account_id FROM player.player WHERE name ='"..pc.get_name().."'")
			    when 20094.chat."Meu id" begin	   
					    say("Teu id é "..id)
			    end
	    end
end
Posted

Quizá diga una tontería y es muy probable pero prueba así:

quest teste begin state start begin local id = mysql_query("SELECT account_id FROM player.player WHERE name ='"..pc.get_name().."'") when 20094.chat."Meu id" begin say("Teu id é "..id) end end end

No puedes poner eso fuera de una condición when o función

Posted

quest teste begin
       state start begin
               when 20094.chat."Meu id" begin
                       local id = mysql_query("SELECT account_id FROM player.player WHERE name ='"..pc.get_name().."'")
                       say("Teu id é "..id)
               end
       end
end

La funcion mysql, devuelve el valor en forma de tabla, por lo tanto el say debe ir asi,

say("adgdfh"..id.account_id[1])

 

Saludos

Posted

Me parecio verlo en alguna quest de yuko y dije ps a ver si es tipo así, fallo de principante ^^

 

Lo que verías sería una función, ya que estás si van fuera del when si no van en el questlib.

  • Dilong locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

This site uses cookies to enhance your browsing experience and provide relevant content. By continuing to browse, you agree to our 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. and Terms of Use. For more information on how we protect your data, please check our Privacy Policy.