Thanks for your answer @roaminggamer love u
i find a .lua script for understand better how tables works, thanks to @robmiracle
I did the installation, downloaded loadsave.lua script and put it on project /
Code:
This on my main.lua
local loadsave = require("loadsave") local t = {} t.number = 10 t.string = "Hello World" t.bool = true t.table = { someOtherString = "this is a test", someOtherNumber = 5} loadsave.saveTable(t, "myTable.json", system.DocumentsDirectory) newTable = loadsave.loadTable("myTable.json", system.DocumentsDirectory) loadsave.printTable(newTable)
In the Corona simulator on terminal prompt prints this:
01:57:55.379 table: 0CD7F2B0 { 01:57:55.379 [number] =\> 10 01:57:55.379 [string] =\> "Hello World" 01:57:55.379 [bool] =\> true 01:57:55.379 [table] =\> table: 0CD7F2B0 { 01:57:55.379 [someOtherString] =\> "this is a test" 01:57:55.379 [someOtherNumber] =\> 5 01:57:55.379 } 01:57:55.379 }
Do you have any idea or where start about displaying a message on the first load?
I tried this:
local options = { rationaleTitle = "Test title", rationaleDescription = "Test message" } local loadsave = require("loadsave") local t = {} t.number = 10 t.string = "Hello World" t.bool = true t.table = { someOtherString = "this is a test", someOtherNumber = 5} native.showPopup( "test", options ) loadsave.saveTable(t, "myTable.json", system.DocumentsDirectory) newTable = loadsave.loadTable("myTable.json", system.DocumentsDirectory) loadsave.printTable(newTable)
Thanks again, mate.