MTA Team 0xCiBeR Posted December 21, 2013 MTA Team Posted December 21, 2013 Bueno estoy creando un sistema de Exports para simplificar las cosas con mi servidor. Esto estaria bien? PD: Obiamente Jugador lo defino cuando mando el export function obtenerDatos(jugador) local cuenta = getPlayerAccount( jugador ) local datos = getAllAccountData( cuenta ) for k,v in pairs ( datos ) do outputChatBox(k..": "..v) return k,v end end DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Castillo Posted December 21, 2013 Posted December 21, 2013 Ese 'return' cancelara el for-loop, porque no envias la tabla 'datos' y haces el loop luego? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
MTA Team 0xCiBeR Posted December 22, 2013 Author MTA Team Posted December 22, 2013 Vale asi: function obtenerDatos(jugador) local cuenta = getPlayerAccount( jugador ) local datos = getAllAccountData( cuenta ) return datos for k,v in pairs ( datos ) do outputChatBox(k..": "..v) end end DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Castillo Posted December 22, 2013 Posted December 22, 2013 No puede haber nada despues del 'return'. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
MTA Team 0xCiBeR Posted December 22, 2013 Author MTA Team Posted December 22, 2013 Ya capte..Gracias solid function obtenerDatos(jugador) local cuenta = getPlayerAccount( jugador ) local datos = getAllAccountData( cuenta ) for k,v in pairs ( datos ) do outputChatBox(k..": "..v) end return datos end DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Castillo Posted December 22, 2013 Posted December 22, 2013 De nada. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts