Table bug..

NoobDevNoobDev Member, PRO Posts: 42

So I have a game published on the android play store. I'm working on an update and when I tested the newest version on my test device some things were not working. It took a while to troubleshoot because booleans were displaying correctly in the creator but show up blank on my device when i plugged in a display behavior. All rows 18 and below are behaving correctly but when I displayed any row after that none of them show. I did create a new table to test and the booleans work fine. Is there any way to fix my table without destroying it and remaking it? Also since it displays just fine in the creator could it mean that the table stored in the devices game data will not allow new rows to be created? I've encountered the issue where table cell values don't show in the gs creator, this isn't that. If anybody has experienced this please advise. Thanks.

Comments

  • bob loblawbob loblaw Member, PRO Posts: 793

    if you are changing values in your original table, you will probably need a new table with updated values to patch those values over. you can’t just change them, which is a pain in the backside, but if you could, it would lead to other issues with saved data on tables.

    the patching is not a hard thing to do. in updating my last release i had to get around the same problem your describing for 1/2/3 star rating values on level entry actors and on levels. was a matter of a few lines of logic to copy three cells of data from the patch table to the main reference table and saving the main reference table. this logic was on the prototype actors for the level select tile, and also on the scene manager actor that i used on each level. (i hope this isn't too waffle sounding).

  • NoobDevNoobDev Member, PRO Posts: 42

    I get not being able to overwrite save data but wouldn't the display table cell value return whatever is stored in the saved data instead of just blank? Also when i tested earlier I created 3 new rows with no data in them that would not be on that devices saved data and they all returned blank values as well. So that is confusing. Unless you are saying that I cannot add new rows or columns of data to a table to games that have already been released since users that have saved data wont be able to use the new data, only new users?

  • bob loblawbob loblaw Member, PRO Posts: 793
    edited August 2021

    you can add new rows but gs does weird stuff.

    in the patching example i gave, when i used change table cell behaviours to patch from one table to another, it worked. then when i used the same table behaviours but changed the table it read info from, it read values as blank, and i had to redo all the logic to read from the table.

    not sure about adding rows to tables after they’ve already been used though on an update, but there is logic to add rows in the app (which i also needed to do on my final update).

  • NoobDevNoobDev Member, PRO Posts: 42

    I see. I never even noticed that behavior. So if for example my app at launch had 18 rows, and then I add a 19th row to said table, the only way for it to show up to users that are updating the app is to use this behavior? And will all the values of this created row be 0 by default? As in if they were all integer types or false for booleans? Or will they appear as the values I input into those cells in the creator?

  • bob loblawbob loblaw Member, PRO Posts: 793

    possibly. i’ve had issues with tables like you’ve described. can be very annoying.

    if you were patching be rows from another table you’d probably need to do a check of row numbers, and only incorporate the add rows, copy table data, save table behaviours if those rows aren’t there.

  • KumiiKumii Member, PRO Posts: 30

    Try changing the name of the table in the table editor before your next update. I found this worked for me.

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,159

    In case it helps you think about the issues here's what's happening. When you save a table, it saves something like the file that's stored in your gameproj. So when you load the game, whatever is in that saved file overwrites whatever is in your project, you lose any new rows, columns or updates.

    The best thing to do as @bob loblaw noted, is to create a new "update" table and patch in whatever you need to update.

    Programmers face a similar thing in live stuff in the form of database migrations.

    Hope that helps.

Sign In or Register to comment.