| [Tutorial] Funções Lua | 
|          0        | ||
| 	Este tópico foi criado com o intuito de explicar detalhadamente as funções disponíveis na api lua, as bibliotecas comentadas aqui são do lua e não do transformice. Math 
 math.abs(n) 
 > math.abs(-10) >> 10 math.acos(n) 
 > math.acos(0) >> 1.5707964 math.asin(n) 
 > math.asin(1) >> 1.5707964 math.atan2(x, y) 
 > math.atan(5,3) >> 1.3734008 math.ceil(n) 
 > math.ceil(5.3) >> 6 math.cos(n) 
 > math.cos(5) >> 0.2836622 math.deg(n) 
 > math.deg(1.5707964) >> 90.00001 math.exp(n) 
 > math.exp(5) >> 148.41312 math.floor(n) 
 > math.floor(5.3) >> 5 math.fmod(x, y) 
 > math.fmod(5,2) >> 1 math.huge 
 > math.huge >> inf math.ldexp(n, e) 
 > math.ldexp(6, 2) >> 24 math.log(n) 
 > math.log(8) >> 2.0794415 math.max(x, y) 
 > math.max(5, 8) >> 8 math.min(x, y) 
 > math.min(5, 8) >> 5 math.modf(n) 
 > math.modf(5.7) >> 5 0.7 math.pi 
 > math.pi >> 3.1415927 math.pow(x, y) 
 > math.pow(4, 2) >> 16 math.rad(n) 
 > math.rad(90) >> 1.5707964 math.random(x, y) 
 > math.random(1, 6) >> 5 math.randomseed(n) 
 > math.randomseed(1) >> math.sin(n) 
 > math.sin(1) >> 0.84147096 math.sqrt(n) 
 > math.sqrt(16) >> 4 math.tan(n) 
 > math.tan(4) >> 1.1578213 Os 
 os.date(pattern) 
 > os.date("*t").hour >> 5 os.difftime(x, y) 
 > os.difftime(1459961176817, 1459961175817) >> 1000 os.time() 
 > os.time() >> 1459961175817 String 
 string.byte(c) 
 > string.byte("a") >> 97 string.char(n) 
 > string.byte(97) >> a string.find(s, pattern) 
 > string.find("lua mitos", "lua") >> 1 string.format(pattern, ...) 
 > string.format("%d ovelhas", 3) >> 3 ovelhas string.gmatch(s, pattern) 
 > string.gmatch("3 ovelhas, 2 patos", "%d") >> 3 >> 2 string.gsub(s, pattern, value, n) 
 > string.gsub("4 ovelhas", "4", "2") >> 2 ovelhas string.len(s) 
 > string.len("Duas ovelhas") >> 12 string.lower(s) 
 > string.lower("UMA OVELHA") >> uma ovelha string.match(s, pattern) 
 > string.match("1 OVELHA, 2 OVELHAS", "%d") >> 1 string.rep(s, n) 
 > string.rep("OVELHAS ", 5) >> OVELHAS OVELHAS OVELHAS OVELHAS OVELHAS string.reverse(s) 
 > string.reverse("OVELHA") >> AHLEVO string.sub(s, x, y) 
 > string.sub("Duas ovelhas", 5) >> ovelhas string.upper(s) 
 > string.upper("uma ovelha") >> UMA OVELHA Table 
 table.concat(t, separator) 
 > table.concat({"Porquinhos", "Ovelhinhas"}," e ") >> Porquinhos e Ovelhinhas table.insert(t, [n], v) 
 > table.insert({}, "ovelhas") >> {[1] = "ovelhas"} table.remove(t, n) 
 > table.remove({"ovelhas", "galinhas"}, 1) >> {[1] = "galinhas"} table.srt(t, function) 
 Regex 
 Padrões 
 Exemplos 
 Dernière modification le 1459963380000 | 
|  Naquelana  « Citoyen »  1403283780000 
 
 |          0        | ||
| vlw precisava saber oq else fazia | 
|  Anndyblack    « Citoyen »  1403284620000 
 
 |          0        | ||
| Um Ajudou Muito ! | 
|  Mumich    « Citoyen »  1403284620000 
 
 |          0        | ||
| [Eshkation] comentem e ganhem 5000 morangos: http://atelier801.com/topic?f=6&t=772486 operadores estão incompletos falta ^ % ! not and or entre outros | 
|          0        | ||
| Tuliomumic a dit :  O Charizard queimou partes do meu topico, charizard mau. | 
|  Naquelana  « Citoyen »  1403284800000 
 
 |          0        | ||
| Eshkation a dit : ele invadiu seu word? | 
|  +Thogabriel    « Citoyen »  1403287380000 
 
 |          0        | ||
| Legall | 
|  Brenower    « Censeur »  1403287560000 
 
 |          0        | ||
| Que tópico bem explicado comentei cade meus morangos? | 
|  Naquelana  « Citoyen »  1403287620000 
 
 |          0        | ||
| Brenower a dit : ele disse que tem morrrer 300 vezes no mice | 
|  Robonado    « Citoyen »  1403299260000 
 
 |          0        | ||
| Tem também operação de potência (x^numero.que.eleva) e a de raiz quadrada (math.sqrt(numero)). | 
|  Stheblindd    « Citoyen »  1403299620000 
 
 |          0        | ||
| Faltou while! Todo mundo esquece do while! :( | 
|  Robonado    « Citoyen »  1403300460000 
 
 |          0        | ||
| Stheblindd a dit : altos crash | 
|  Cagaonacausa    « Citoyen »  1403308380000 
 
 |          0        | ||
| Mestre da programação Lua e Python, esse ech. Stheblindd a dit : Pois é, ela é super importante :D Dernière modification le 1403308440000 | 
|          0        | ||
| Topico atualizado, table,string,math,os adicionados! :P | 
|  Tickal    « Censeur »  1403360880000 
 
 |          0        | ||
| Achei bem útil Esh ^^ | 
|          0        | ||
| Padrões adicionados! ^-^ | 
|  Niunzin    « Citoyen »  1403371980000 
 
 |          0        | ||
| Bem legal o tópico, organizado e talz, vai ajudar bastante a galera \o/ | 
|          0        | ||
| Niunzin a dit : obrigado, q-q | 
|  Mumich    « Citoyen »  1403459160000 
 
 |          0        | ||
| alerta de padrões incompletos pipipi!!!!! Então, se você colocar a letra maiúscula, ele vai pesquisar tudo que não é ele, ou seja %A vai procurar tudo não-letra, etc. Tem também a falta do modificador "^" (sei la o que ele faz) e você pode também criar seus próprios padrões, colocando "[o que vc quer]" also bom trabalho nesse tópico, vai ajudar 1 povão Dernière modification le 1403459220000 | 
|          0        | ||
| Tuliomumic a dit : Eu tbm n sei pra que serve o ^, mais tarde dou uma olhada no manual lua. |