Displaying text from a table.

dalbelodalbelo Member Posts: 6
edited July 2012 in Working with GS (PC)
I have a table labeled "TbTiaLines" with 2 Text columns and 10 rows. I am trying to get an actor to display the text from this table. I added a rule so that when touch is released it should display text from the specified cell "tableCellValue(game.TbTiaLines, 1, 1), but when I preview it all that displays is a "0". I have tried "tableCellValue(TbTiaLines, 1, 1), but I get the same result. Any assistance will be appreciated.

Dalbelo

Best Answer

  • MotherHooseMotherHoose Posts: 2,456
    Accepted Answer
    yes! we all have to remember that the computer does not use our names for assets/attributes
    computers call/access items by their id#
    thankfully, GameSalad tells the computer the correct id# from the selectionList of our naming

    Awesome! that you figured this one out for yourself @dalbelo … that is real learning!

    image MH

Answers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Can you post a screenshot of your rules? That usually happens if there is a typo in the table name. What happens if you log the tableCellValue to the log debugger window? Is it still zero?

    With the Mac version, the table name would be TbTiaLines without the "game." prefix. Not sure about in Windows.

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

  • ericzingelerericzingeler Member Posts: 334
    I don't believe you can display text from a table. Throw the value in an attribute first.
  • dalbelodalbelo Member Posts: 6
    I figured it out. I can't type the "game.TbTiaLines" into the field. I have to choose it from the attributes by clicking in the display text field, and then drilling down into the attributes which automatically adds the chosen items. The text is the same but it is enclosed in a light blue bubble.

    Thanks for the suggestions.
Sign In or Register to comment.