PACI Posted June 18, 2013 Report Share Posted June 18, 2013 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 Link to comment Share on other sites More sharing options...
Shogun Posted June 18, 2013 Report Share Posted June 18, 2013 Si lo que buscas es el id de la cuenta está correcto. PACI 1 Link to comment Share on other sites More sharing options...
Rafa23Alzira Posted June 18, 2013 Report Share Posted June 18, 2013 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 Link to comment Share on other sites More sharing options...
Shogun Posted June 18, 2013 Report Share Posted June 18, 2013 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 Link to comment Share on other sites More sharing options...
Yori Posted June 18, 2013 Report Share Posted June 18, 2013 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 PACI and Shogun 2 Link to comment Share on other sites More sharing options...
PACI Posted June 18, 2013 Author Report Share Posted June 18, 2013 Bueno gracias a los 3, a ti también rafa por intentar ayudar Link to comment Share on other sites More sharing options...
Rafa23Alzira Posted June 18, 2013 Report Share Posted June 18, 2013 No puedes poner eso fuera de una condición when o función Me parecio verlo en alguna quest de yuko y dije ps a ver si es tipo así, fallo de principante Link to comment Share on other sites More sharing options...
pepineitor Posted June 18, 2013 Report Share Posted June 18, 2013 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. Link to comment Share on other sites More sharing options...
Recommended Posts