playMaker

Author Topic: Hash table question (simple?)  (Read 1382 times)

krane

  • Junior Playmaker
  • **
  • Posts: 63
Hash table question (simple?)
« on: February 06, 2017, 11:23:11 AM »
I haven't used hashtables before, so excuse the dumb question.
I want to create a hashtable of items that have a cost, for instance, "can of beans" costs 50.

When I fill the prefilled data and it asks for prefill type, is it asking for item or key?

And I see I can use Hash Table Get Key from Value, but not the inverse, so I assume the cost is my key, and the value is my string (name of item)?

marv

  • Junior Playmaker
  • **
  • Posts: 50
Re: Hash table question (simple?)
« Reply #1 on: February 06, 2017, 11:56:03 AM »
Key: a unique Identifier within a hash table, always a string, in your case probably an itemID or name
Value: the content of the variable, in your case the price integer

You access them with the "hashtable get" and "hashtable get many" actions, the actions have fields for the key you want to access.

cheers.