Lua Snippets |
![]() ![]() « Citoyen » 1380457080000
| 0 | ||
a dit : |
0 | ||
can you give me ffa codes? |
![]() ![]() « Citoyen » 1380457440000
| 0 | ||
a dit : [•] Init Error : transformice.lua:274: [string "transformice.lua"]:1: '=' or 'in' expected What's rong huehuehue |
![]() ![]() « Citoyen » 1380457560000
| 0 | ||
Abdeltif a dit : for p,_ in pairs (tfm.get.room.playerList) do if tfm.get.room.playerList .isShaman then |
![]() ![]() « Citoyen » 1380460260000
| 0 | ||
i want print and chatmessage working for all :p |
0 | ||
I have a problem D= function eventChatCommand(playerName,command) end elseif command=="sham" then tfm.exec.setShaman(name) end elseif command=="meep" then tfm.exec.giveMeep(name) end elseif command=="mort" then tfm.exec.killPlayer(name) end elseif command=="victory" then tfm.exec.giveCheese(name) end tfm.exec.playerVictory(name) end elseif command=="comandos" then ui.addPopup(2,0,"<font size='15' color='#C0C0D8'>Estos son los comandos actuales: <b>!sham</b> - Te transformas en chamán. <b>!meep</b> - Te da el meep. <b>!mort</b> - Mueres. <b>!victory</b> - Ganas la partida.</font></p>",targetPlayer,270,200,300) end end That don't work D= |
![]() ![]() « Citoyen » 1380462960000
| 0 | ||
Aritxy a dit : For one, your ending the function right away. |
0 | ||
Jaackster a dit : function eventChatCommand(playerName,command) end elseif command=="sham" then tfm.exec.setShaman(name) elseif command=="meep" then tfm.exec.giveMeep(name) elseif command=="mort" then tfm.exec.killPlayer(name) elseif command=="victory" then tfm.exec.giveCheese(name) tfm.exec.playerVictory(name) elseif command=="comandos" then ui.addPopup(2,0,"<font size='15' color='#C0C0D8'>Estos son los comandos actuales: <b>!sham</b> - Te transformas en chamán. <b>!meep</b> - Te da el meep. <b>!mort</b> - Mueres. <b>!victory</b> - Ganas la partida.</font></p>",targetPlayer,270,200,300) end end -- [•] Init Error : transformice.lua:274: [string "transformice.lua"]:4: '' expected |
![]() ![]() « Citoyen » 1380463200000
| 0 | ||
remove the end after the function eventChatcommand use an if instead of elseif for the first command |
0 | ||
Xxninjazxx a dit : function eventChatCommand(playerName,command) elseif command=="sham" then tfm.exec.setShaman(name) if command=="meep" then tfm.exec.giveMeep(name) if command=="mort" then tfm.exec.killPlayer(name) if command=="victory" then tfm.exec.giveCheese(name) tfm.exec.playerVictory(name) if command=="comandos" then ui.addPopup(2,0,"<font size='15' color='#C0C0D8'>Estos son los comandos actuales: <b>!sham</b> - Te transformas en chamán. <b>!meep</b> - Te da el meep. <b>!mort</b> - Mueres. <b>!victory</b> - Ganas la partida.</font></p>",targetPlayer,270,200,300) end end -- don't work D= |
![]() ![]() « Citoyen » 1380463740000
| 0 | ||
All conditions except the first one should start with elseif, whereas the first one should be a simple "if". |
![]() ![]() « Citoyen » 1380463860000
| 0 | ||
You also seem to have a slight error, playerName is supplied, and not name. |
![]() ![]() « Citoyen » 1380463860000
| 0 | ||
NO IT SHOULD BE IF FOR THE FIRST ONE AND ELSEIF FOR THE REST |
0 | ||
Xxninjazxx a dit : Oh sorry xd |
0 | ||
How can I make a !clear (removing all the objects) code? i've tried a dit : but it doesnt work. |
![]() ![]() « Citoyen » 1380464760000
| 0 | ||
Magicalorb a dit : double end, or if it's not your last command, leave it with no ends and then add double ends after your last command. |
![]() ![]() « Citoyen » 1380464760000
| 0 | ||
Magicalorb a dit : Baasbase a dit : |
0 | ||
Baasbase a dit : [•] Init Error : transformice.lua:274: [string "transformice.lua"]:93: 'end' expected (to close 'function' at line 51) |
![]() ![]() « Citoyen » 1380464880000
| 0 | ||
put another end |
![]() ![]() « Citoyen » 1380467940000
| 0 | ||
Could you add something to spawn balls everywhere every few milliseconds, maybe? -3- |