Jump to content

Hola


Arsilex

Recommended Posts

Posted

Bueno llevo un buen rato intentado ver el como quedo una tabla por completo sacada de un json pero no consigo hacer nada...

maleter = fromJSON(data.maletero) 
maleteros[data.vehicleID] = {maleter[1], maleter[2], maleter[3], maleter[4]} 
outputDebugString(maleter[1]) 

pero siempre me da nil :S y no entiendo por que :S

este es el JSON

[ { "5": [ "15", "3", "59", "12" ] } ] 

el JSON lo eh formado asi:

test = toJSON( {  
    [vehID] = {arma1, ammo1, arma2, ammo2} 
    } ) 

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted
maleter = fromJSON(data.maletero) 
maleteros[tostring ( data.vehicleID )] = {maleter[1], maleter[2], maleter[3], maleter[4]} 
outputDebugString(maleter[1]) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

ya lo soluciones.

maleteros[data.vehicleID] = {maleter[""..carid..""][1], maleter[""..carid..""][2], maleter[""..carid..""][3], maleter[""..carid..""][4], maleter[""..carid..""][5], maleter[""..carid..""][6], maleter[""..carid..""][7], maleter[""..carid..""][8]} 

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
  • Recently Browsing   0 members

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