|
| 25 Nov 2016 12:19 PM |
table1 = {2} table2 = {"stiiky"} the issue is, the two tables can switch at any moment how could I do like
if table1 = number then print("table 1 is number") else print("table 1 is string") end |
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 25 Nov 2016 12:21 PM |
iterate through the values of the table and use 'type()'
Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil) |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2016 12:23 PM |
| thanks. didnt know that existed. |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2016 12:28 PM |
| I agree with caca, you can also use "type()" when coding in Python. |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2016 12:34 PM |
| ooh, thanks for that too. I plan to learn python and c++ |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2016 12:36 PM |
Skip python. C++ is great. Or learn Javascript instead of python :P
295,562 slices of pizza and counting |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
|
| 25 Nov 2016 01:10 PM |
| I have 3+ experience in Python, JavaScript, and C++. In fact, I'll teach you all three for free if you want. |
|
|
| Report Abuse |
|
|