Why there is not Index Attribute in Tables?

iTopGamesiTopGames Member Posts: 71
edited June 2012 in Working with GS (Mac)
Why there is not Index Attribute in Tables? Does somebody know the reason?

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    What do you mean? You can use the row number if that's what you're referring to.

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

  • iTopGamesiTopGames Member Posts: 71
    When you are using tables, you can choose between Text, Boolean, Angle, Real and Integer attribute but the Index is not there.
  • master200012master200012 Member Posts: 372
    Index attributes alone cannot exist for the purpose of having a set value of functioning when called upon.

    Basically, you need to constrain a given index attribute to the specific table value.

    Hopefully, soon we will get a direct attribute value for tables, but it's probably not their first priority.

    Hope this helped!
  • iTopGamesiTopGames Member Posts: 71
    What do you mean? You can use the row number if that's what you're referring to.
    Hi @tatiang i just wanted to know the reason why there was not Index attribute in tables, i wanted to put it because i needed to express a positive number like Score but Index attribute wasn't there in tables, and there must be a reason for that, i think.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Right, I understand your question now, but I don't have an answer! I actually hadn't noticed that before.

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

  • iTopGamesiTopGames Member Posts: 71
    Right, I understand your question now, but I don't have an answer! I actually hadn't noticed that before.
    I want to know if its for a reason or just somebody forgot to add it there :)
  • EatingMyHatEatingMyHat Member Posts: 1,246

    Hi @tatiang i just wanted to know the reason why there was not Index attribute in tables, i wanted to put it because i needed to express a positive number like Score but Index attribute wasn't there in tables, and there must be a reason for that, i think.
    I know that many people use Index for this purpose, but frankly it is a bad way to do it. If a value gets negative with out your intention, just letting the datatype block it from happening can result in other unwanted behaviors.

    Index are supposed to be more memory efficient compared to integer, in that scenario having them in tables makes perfect sense.
  • iTopGamesiTopGames Member Posts: 71

    Hi @tatiang i just wanted to know the reason why there was not Index attribute in tables, i wanted to put it because i needed to express a positive number like Score but Index attribute wasn't there in tables, and there must be a reason for that, i think.
    I know that many people use Index for this purpose, but frankly it is a bad way to do it. If a value gets negative with out your intention, just letting the datatype block it from happening can result in other unwanted behaviors.

    Index are supposed to be more memory efficient compared to integer, in that scenario having them in tables makes perfect sense.
    I hope somebody from GS tell us which is the reason why there is not Index attribute in tables. Just for curiosity :)
Sign In or Register to comment.