Display Text not working with table contents on Mac
danijelj
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:
This is the name of my table:
This is the table opened up:
I have removed the expression and replaced it with plan text too, it does not work.
I get a text box that shows this:
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.
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:
This is the name of my table:
This is the table opened up:
I have removed the expression and replaced it with plan text too, it does not work.
I get a text box that shows this:
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
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
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!
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
Your original question was so well layed out, bold text, images... it deserved an answer.
Sorry, it doesn't work anymore
@Titanical Tech Production What doesn't work?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
When I do tableCellValue(game.PlayerId,2,1) in a display text function (it is a text value) it gives me invalid expression.
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
First Screenshot is the function. Second is what happens. Third is the table.
Yes it does, you haven't read the answers properly. The bold.
@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
Thank you, tatiang. Well done!!