Display Text not working with table contents on Mac

danijeljdanijelj Sydney, AUMember Posts: 6
I am trying to display the text of Row1:Column1 of my table called copyNotice. I have looked at the different posts on GameSalad to no avail for this.

The scene name is planetComparison
The table name is something
Using expression editor I choose tableCellValue(table,row,col)

Here is the actual expression/function being used:
image

This is the name of my table:
image

This is the table opened up:
image

I have removed the expression and replaced it with plan text too, it does not work.

I get a text box that shows this:
image

I am using GameSalad 0.10.4.1 BETA on Mac OS X. Any help would be greatly appreciated. I would rather use the text box to display the text, than align multiple boxes over the top of each other. Most cells in the table aforementioned are 3 lines.

Comments

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    edited March 2014
    I've never tried using Scene name in a rule before so it might be that part of you code.

    If you take the 'display text' behaviour out of the rule, and have it by itself. so it's just triggered straight away, does it display correctly.

    If so then the problem is with the rule.

    If still no luck I've got a free template on my site 'Stormys GS Tableizer'. That displays the values from values in tables. Download it and compare my rules to yours.

    Good luck

    Jon
  • danijeljdanijelj Sydney, AUMember Posts: 6
    OK. Apart from the face that I had a p121029 turned off in my example photo, it actually was ON.

    I removed the DisplayText function from the rule and deleted the rule - Invalid Expression
    I made the text box that displays it REALLY BIG - Invalid Expression

    Could you provide me a URL @StormyStudio‌ that I might go grab an example and have a quick look to see any difference.

    Thank you!
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    edited March 2014
    ah.. think I've seen your problem..

    When you add the table name to your function in the display text behavior. You need to manually go in and choose the table name from your game attributes... you can't simply type the table name (this is because tables can have the same name).

    So it will be tableCellValue(game.copyNotice, 1,1)

    So the steps are:

    Drag in a new display text behavior,

    add the tableCellValue() function from the function drop down...

    Then press the down arrow on the left and choose, game (which is where all your game attributes can be seen) and then select your table... this will bring your table name into the expression box properly.


    If it still does'nt work.. I'll make a simple project for you.

    Good luck

    Jon
  • danijeljdanijelj Sydney, AUMember Posts: 6
    ^+1 OMG! This is how you do it? This is amazing! Thank you so much! It works like a charm. Thank you so much!
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    edited March 2014
    He he... Happy to be of service..

    Your original question was so well layed out, bold text, images... it deserved an answer.
  • Titanical Tech ProductionTitanical Tech Production Member, PRO Posts: 35

    Sorry, it doesn't work anymore

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @Titanical Tech Production What doesn't work?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Titanical Tech ProductionTitanical Tech Production Member, PRO Posts: 35

    When I do tableCellValue(game.PlayerId,2,1) in a display text function (it is a text value) it gives me invalid expression.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited August 2018

    There could be a dozen reasons why it's not working for you. You'll probably need to provide screenshots of your rules or upload a project file for anyone to be able to figure out what you've set up incorrectly. It's probably something simple to fix.

    Make sure you're selecting the attribute (game.PlayerId) from the attribute browser menu instead of just typing in its name.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Titanical Tech ProductionTitanical Tech Production Member, PRO Posts: 35

    First Screenshot is the function. Second is what happens. Third is the table.

  • pHghostpHghost London, UKMember Posts: 2,342

    @Titanical Tech Production said:
    Sorry, it doesn't work anymore

    Yes it does, you haven't read the answers properly. The bold.

    @StormyStudio said:

    You need to manually go in and choose the table name from your game attributes... you can't simply type the table name (this is because tables can have the same name).

    Press the down arrow on the left and choose, game (which is where all your game attributes can be seen) and then select your table... this will bring your table name into the expression box properly.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited August 2018

    @Titanical Tech Production Here's a video (no sound) that shows how you select the table name. Note that I went back into the expression editor after I closed the expression; this isn't necessary, I just wanted to show you how the table name should look when selected rather than typed in.

    I recommend watching it on YouTube in highest-quality.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Titanical Tech ProductionTitanical Tech Production Member, PRO Posts: 35

    Thank you, tatiang. Well done!!

Sign In or Register to comment.