Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Table has no values after json encoding/decoding?

Asked by 2 years ago
Edited 2 years ago

Edit: Found the issue! If anyone finds this 7 years from now and wants to know the solution here it is:

Originally I had been saving the table like this:

{
        --pet 1
        n1 = "alien", 
        r1 = "common", 
        c1 = 75,
        --pet2
        n2 = "dragon", 
        r2 = "unique", 
        c2 = 25,

    }

But it turns out I had to store it this way

{
        --pet 1
        "alien", 
        "common", 
        75,
        --pet2
        "dragon", 
        "unique", 
        25,

    }

simple problem simple fix, somehow took me half an hour to figure out.

1 answer

Log in to vote
0
Answered by 2 years ago

Nevermind I found the issue. Had to do with me adding the variable name. if anyone finds this 7 years later and wants the answer, remove n1,r1,c1 and all that so its just the values

Ad

Answer this question