English What is Table?

10 replies
Goto Page
To the start Previous 1 Next To the start
18.09.15 01:10:17 am
Up
Paulo49
User
Offline Off
Example Script With Table please?
edited 1×, last 18.09.15 02:26:25 am
Paulo Henrique
18.09.15 01:11:27 am
Up
Mami Tomoe
User
Offline Off
Something related to strings..??
edited 1×, last 18.09.15 01:27:02 am
fish
18.09.15 01:27:39 am
Up
Paulo49
User
Offline Off
@user Mami Tomoe: -.-' I thought that was a help forum.
Paulo Henrique
18.09.15 01:32:57 am
Up
Mami Tomoe
User
Offline Off
@user Paulo49: That's a freeware forum that happened to be kind and help you...
fish
18.09.15 02:02:04 am
Up
Seekay
Reviewer
Offline Off
thread cs2d [GUIDE] How to script

Scroll down to Variables II.
Wash your hands! :­)
18.09.15 02:26:55 am
Up
Paulo49
User
Offline Off
@user Seekay: Thank you Seekay is not like some.
Paulo Henrique
18.09.15 02:32:37 am
Up
Mami Tomoe
User
Offline Off
user Paulo49 has written:
some


Racist
fish
18.09.15 02:02:58 pm
Up
StirlizZ-Fapicon
Super User
Offline Off
user Mami Tomoe has written:
Racist


Chill, his problem is solved.
CS2d for ANDROID Discord server is here: https://discord.gg/ww59nvf
18.09.15 07:14:27 pm
Up
XoOt
Super User
Offline Off
Quote:
What is Table?


Answer:
This is a table.

IMG:http://www.mrrental.com.au/media/furniture/cobran-coffee-table.jpg?sfvrsn=2


You will see most tables in addition with something suspicious called 'chair'. Here's a image if you also dont know it.
IMG:http://cdn.mattblatt.com.au/productimages/The-Matt-Blatt-Replica-Emeco-US-Navy-Chair-Aluminium?w=440&h=460&id=15590&fullSize=True


Ps: no need to thank me, im glad that i could help.
18.09.15 10:17:36 pm
Up
Nekomata
User
Offline Off
Yes, but he asked for a script on the table. ;0
18.09.15 10:59:22 pm
Up
TimeQuesT
User
Offline Off
user XoOt: definitely one of the best answers I've ever seen

Well to make it short: A table is a variable that actually holds many other variables.

Here's a example:
Code:
1
2
3
4
pseudo_table = {5, 10, 15, 1, 3, 100};
for i = 1, #pseudo_table do
     print(pseudo_table[i]);
end


Imagine if there were no tables:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
a = 5;
b = 10;
c = 15;
d = 1;
e = 3;
f = 100;

print(a);
print(b);
print(c);
print(d);
print(e);
print(f);


Something special in lua is that a table can store many variables of many types. Unlike in c++ or in many other programming languages.

LUA
Code:
1
pseudo_table = {100, 50, 20, "This is a string!", "hey another string :D", 5.0, 3.0};


C++
Code:
1
2
3
int pseudo_array_int[3] = {100, 50, 20};
std::string pseudo_array_string[2] = {"This is a string!", "hey another string :D"};
float pseudo_array_float[2] = {5.0f, 3.0f};
Muh
To the start Previous 1 Next To the start