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
It should work fine with an attribute. Here's an example.
Those expressions get really confusing... it's possible you have an error somewhere.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks. I figured out what i had wrong. I had the attribute in quotes. Now it works as it should.
Mental Donkey Games
Website - Facebook - Twitter
Dang it! @tatiang always beats me to the good questions!
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
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.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User