Are dictionaries allowed to print numbers and "strings" at the same time. For example let's say we have 2 scripts and we wanted them to print " 1 Hi" and the other one to print 2 "XD". would it work.
I didn't understand your question but here is an example of printing from the dictionary:
01 | local Dictionary = { |
02 | [ "Stri" ] = 1 ; |
03 | [ "Xd" ] = "Hello" ; |
04 | } |
05 |
06 | for i,v in pairs (Dictionary) do |
07 | print ( tostring (v)) |
08 | end |
09 |
10 | --Prints 1 and Hello |
Not sure exactly what you mean but this is what you can do with tables/dictionaries:
1 | local table = { 1 , "Hi" } |
2 | -- table[1] = 1, table[2] = "Hi" |
3 | local table = { |
4 | Example = { |
5 | "Hi" , |
6 | 2 , |
7 | } |
8 | } |
9 | -- table.Example[1] = "Hi", table.Example[2] = 2 |
Locked by JesseSong
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?