Question about TableSearch function

I´m experimenting with a word game and came across a problem that i can´t solve.

Basically what i´m trying to do is search a table for a word that i´ve selected in the game.
I have a text attribute that will contain the word that i find, and i use this attribute as the "key" in TableSearch function,
but for some reason the search result always becomes 0.
This also happens if i type a word straight in the attribute and don´t select the letters in the game.

The code should be fine, because if i manually type in a word in the "key" part of TableSearch, it will find it in the table and show me witch row it is in.

I´m using TableMergeValues to get the letters to the text attribute i use. And with Display Text i can see that the word is infact in the attribute.

So my question is, can an attribute even be used in the "key"? and if it can, how?

I hope i explained this well enough...

Comments

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

    It should work fine with an attribute. Here's an example.

    Those expressions get really confusing... it's possible you have an error somewhere.

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    Thanks. I figured out what i had wrong. I had the attribute in quotes. Now it works as it should.

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    edited April 2015

    Dang it! @tatiang always beats me to the good questions! ;)

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

    This one DID have your name written all over it, @Braydon_SFX. You have some very good tutorials including one on table searching in the Community Tutorials sub forum.

Sign In or Register to comment.