Module API FAQ |
Leafileaf « Citoyen » 1377264360000
| 0 | ||
Tomdizzy a dit : Ok yea. Btw, congrats on the 100th post. Someone please tell me something about my mod function... |
0 | ||
I can point out a few problems, but since I can't run Lua either I can't actually give you a fleshed-out solution. The following should be noted, however: a dit : This is an exact match: you "makemod anyone" will not satisy this condition. Instead, you should use match, such as elseif message:match("makemod %a+") You can also use this to get the name straight from the message and save yourself a lot of time without that for loop by simply saying local username=message:match("makemod (%a+)") if tfm.get.room.playerList[username] then -- players[username].mod=true -- end Also, you use "players" a lot, but it isn't defined anywhere. You should make that >.> One last thing: by default, everything is global, so you really almost never need to use _G unless, for some odd reason, you use the same local and global variable names somewhere. |
Leafileaf « Citoyen » 1377266940000
| 0 | ||
Um, if I wasn't wrong, you don't have to define a variable to use it in Lua. So I guess my usage was legit :3 And thanks for the help Fxie, I'll add some acknowledgement in the minigame (not just the script). ^^ |
Shamousey « Consul » 1377267300000
| 0 | ||
Leafileaf a dit : If you don't define something, it doesn't exist, and therefore is nil and unusable. |
Leafileaf « Citoyen » 1377267840000
| 0 | ||
How do you even define something in Lua ._." |
Shamousey « Consul » 1377268080000
| 0 | ||
Leafileaf a dit : Using the = operator. tableName = {} variableName = 4 |
Leafileaf « Citoyen » 1377270000000
| 0 | ||
Ok thanks. I'll declare the table. |
Luisemma « Citoyen » 1377270000000
| 0 | ||
How to Join Lua team shamousey plss |
Shamousey « Consul » 1377272400000
| 0 | ||
Luisemma a dit : That's outlined in the first post. |
Safwanrockz « Censeur » 1377294960000
| 0 | ||
Can anyone give me a code that is similar to pictionary? Like there is a new command/message each round. I asked shamo but apparently he was afk ;; |
Shamousey « Consul » 1377295740000
| 0 | ||
a dit : I hope this helps, Safwan. |
Safwanrockz « Censeur » 1377295860000
| 0 | ||
Thank you! |
Epicshawty « Citoyen » 1377398100000
| 0 | ||
How do you exactly run a room like do you go to like /room #abc and you put the code in there (if you're in the lua team) |
Shamousey « Consul » 1377398220000
| 0 | ||
Epicshawty a dit : 1. Enter a room starting with # or *#, making sure the room name is 5 or more characters long. 2. Open the Lua prompt (/lua). 3. Enter the code in the text box. 4. Hit submit to excecute it. |
Epicshawty « Citoyen » 1377398400000
| 0 | ||
Shamousey a dit : danke :) EDIT: Suicide command a dit : |
Shamousey « Consul » 1377427320000
| 0 | ||
a dit : > a dit : You seemed to miss that last bit out, Epicshawty. |
Epicshawty « Citoyen » 1377464040000
| 0 | ||
Shamousey a dit : im a beginner so yeah xD i removed the (playerName) on purpose because I thought if you did like !mort Shamousey it killed you so yeah xD |
0 | ||
playerName is the name of whoever typed the command, command is the full string If you typed !mort Shamousey, playerName would be "Epicshawty" and command would be "mort Shamousey" |
Epicshawty « Citoyen » 1377464400000
| 0 | ||
Fxie a dit : thanks for the help :) so playerName can avoid other players and it can't avoid you that seems pretty cool |
Cadencecool « Citoyen » 1377474300000
| 0 | ||
May i need some help?? Wanted to make a Minigame .. |