This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
dragonmaster90's profile picture

direwolf20's code help

Started by dragonmaster90, 30 January 2013 - 06:59 AM
dragonmaster90 #1
Posted 30 January 2013 - 07:59 AM
i want to know how this code works,
[Lua] button - Pastebin.com

like: what does math.floor? and such

note: this code is made by direwolf20 not me
note2: im not a high-end math student
note3: most that i find on google aren't clear
Edited on 30 January 2013 - 07:13 AM
Mads #2
Posted 30 January 2013 - 08:03 AM
Look at the Lua manual. And use Google, damnit.
dragonmaster90 #3
Posted 30 January 2013 - 08:11 AM
Look at the Lua manual. And use Google, damnit.
i know i can find it but i get like a 10000 results that most aren't clear or not even SOME information
Mads #4
Posted 30 January 2013 - 08:14 AM
Well then start learning Lua… Don't just copy some dude's code and expect us to explain it all to you, as you would still not be able to program anything yourself.

Believe me, that's not how learning works.
dragonmaster90 #5
Posted 30 January 2013 - 08:28 AM
Well then start learning Lua… Don't just copy some dude's code and expect us to explain it all to you, as you would still not be able to program anything yourself.

Believe me, that's not how learning works.

i know you're right but i was learning lua BEFORE (about 5-10 months) i asked this question, i know MOST of them but if you want to see a code made by me, here it is (using player detection block from miscperipherals) : http://pastebin.com/fm8UxJh9
TheOddByte #6
Posted 30 January 2013 - 10:23 AM
Here is a link for LUA Math stuff.
This Is Not the original LUA site..
If you wanna get better I suggest you read the manuals over and over again until you are sure you know it good.
And when you've done that then you should try to read through others codes and learn from what they did and such.
Since You Can Always Get Better. ;)/>
ChunLing #7
Posted 30 January 2013 - 11:35 AM
The lua.org site has many helpful resources, like the linked 5.1 reference manual which has concise, accurate information on almost all basic Lua functions (including math.floor()).

I apologize for the rage, but the stickies clearly recommend that you check the Lua documentation before asking for help. When you ask to have extensive help understanding an advanced code sample you did not write, and you clearly didn't RTFM, it can irritate people because it seems that you are asking them to put a lot more effort into helping you than you are willing to invest in helping yourself.