Help with your scripting

rapidjson.load Command

rapidjson.load Command

Postby Shando » 26 Nov 2015, 05:32

Hi SP,

Just a quick question on the rapidjson.load command......

Is the return value purely a Lua Table, or is there a Boolean Success/Fail flag as well??

Thanks

Shando
Ryzen 7 4800H 16GB GTX1650 Win 11 64
Love, Hope, Strength http://www.lovehopestrength.co.uk
User avatar
Shando
Skyline Moderator
Skyline Moderator
 
Posts: 560
Joined: 06 Mar 2013, 22:35
Location: Moffat Beach, Queensland
Skill: Programmer
Skill: Scripter
Skill: Level Designer

Re: rapidjson.load Command

Postby SolarPortal » 26 Nov 2015, 11:16

There is supposed to be one.

like, if complete fail, then it could return: nil, errorString = json.load.

If it works, it may return just 1. I never got the others working that well so its worth a try to see if they work.
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: rapidjson.load Command

Postby Shando » 26 Nov 2015, 11:25

OK, I'll give it a try :D

I assume the success/fail value comes first, like this:

Code: Select all
bFail, tblJSON = rapidjson.load ( "XYZ.json" );


Shando
Ryzen 7 4800H 16GB GTX1650 Win 11 64
Love, Hope, Strength http://www.lovehopestrength.co.uk
User avatar
Shando
Skyline Moderator
Skyline Moderator
 
Posts: 560
Joined: 06 Mar 2013, 22:35
Location: Moffat Beach, Queensland
Skill: Programmer
Skill: Scripter
Skill: Level Designer


Return to Lua Scripting

Who is online

Users browsing this forum: No registered users and 6 guests

cron