GameSalad

Display Text not always showing correct table value

DigiChainDigiChain Posts: 1,111Member, PRO

This is an old bug that I'm running into and wondering if anyone has a solution/work around for it.
The original bug was reported here:
http://bugs.gamesalad.com/show_bug.cgi?id=1644

The issue:
I have a table value (game score) which being continually updated and a Display Text behaviour in my scene which displays that table value. Occasionally though the Display Text behaviour seems to get stuck and no longer updates to show the changing table value (even though the table value continues to update as it should do). This sometimes happens after a scene change, though not always.

@BigDave - You were having this issue with your Cookie Clicker games, did you find a solution?

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,841Member

    Try putting the display text in a loop.

  • DigiChainDigiChain Posts: 1,111Member, PRO

    Thanks Guru, but display text in a loop doesn't work for me... the text isn't displaying at all!

    Another option I tried was placing it in an 'every 0 seconds' timer, but this causes the text to flicker rapidly and isn't ideal anyway.

  • HoodlocHoodloc Posts: 258Member, PRO
    edited April 12

    What's with the workaround mentioned under the bug report by Nizoster? I haven't encountered the bug because nearly all my projects happen in one scene but that workaround sounds like an acceptable one. Doesn't that work for you?

  • DigiChainDigiChain Posts: 1,111Member, PRO

    @Hoodloc - Thanks, just read the thread through again and i'll give the work around a try.

    My game runs mostly within one scene too - and the bug shows up every now and then even when not changing scenes so it can't just be scene change related.

  • BigDaveBigDave Posts: 2,124Member, PRO
    edited April 12

    @DigiChain
    was horrible lot of work but i think it basically had to do with some expressions referring to table cells which did not exist and which was ok before a certain game salad update.

    So get sure you table references always atleast are 1 tablecellvalue(table,1,max(variable,1))

    because it could be that your table reference is called before the variable is initialised.
    leading to a buggy behaviour, causing a none existing cell to be searched

    by having it switch to atleast 1 you avoid the bug and once the variable is loaded it switches to the correct one

  • BigDaveBigDave Posts: 2,124Member, PRO
    edited April 12

    so everytime you do a variable reference to a table cell it has to have the max function to pick the defined 1 over the 0

    if the none existing cell is searched
    all kind causing of issues breaks hole actors and scenes so seemingly unrelated things could stop working

  • BigDaveBigDave Posts: 2,124Member, PRO

    so i did this in all my projects but I am not completely sure if this was the cause or it just helped to re-typ every table reference

  • ArmellineArmelline Posts: 4,341Member, PRO
    edited April 12

    As @BigDave says, the cause is most likely a failed table reference somewhere (or another bit of invalid logic, but 9 out of 10 times it's an invalid table reference.) This isn't a bug in GameSalad, it's a bug in your game. GameSalad used to just ignore such issues, but an update not too long ago caused it to become less forgiving of flaws in your logic.

    Disable actors and logic until the problem ceases, and then check the last things you disabled for possible causes.

  • DigiChainDigiChain Posts: 1,111Member, PRO

    Ok, thanks. Looks like this will be a tough one to track down as it's so intermittent and only happens in actual builds on the device!

  • rainwaterstudiosrainwaterstudios Posts: 39Member, PRO

    @DigiChain said:
    Ok, thanks. Looks like this will be a tough one to track down as it's so intermittent and only happens in actual builds on the device!

    SAME PROBLEM happening to me - the table value fails to display correctly after changing scenes from the level scene to either the death scene or win scene; this problem happens erratically and displays as "1" in the scene instead of the tableCellValue.

    I thought I could get around this issue by saving my score attribute to the table cell every few seconds, but the problem persists and doesn't display the tableCellValue consistently; about 50/50 split between displaying the actual tableCellValue and displaying the singular digit '1' ...

  • ArmellineArmelline Posts: 4,341Member, PRO

    @rainwaterstudios said:
    SAME PROBLEM happening to me - the table value fails to display correctly after changing scenes from the level scene to either the death scene or win scene; this problem happens erratically and displays as "1" in the scene instead of the tableCellValue.

    I thought I could get around this issue by saving my score attribute to the table cell every few seconds, but the problem persists and doesn't display the tableCellValue consistently; about 50/50 split between displaying the actual tableCellValue and displaying the singular digit '1' ...

    Same advice to you - disable actors and logic until the problem stops happening, then re-enable it one thing at a time until the problem starts happening again. That'll tell you roughly where the problem is likely located.

Sign In or Register to comment.