×

Langue

Fermer
Atelier 801
  • Forums
  • Dev Tracker
  • Connexion
    • English Français
      Português do Brasil Español
      Türkçe Polski
      Magyar Română
      العربية Skandinavisk
      Nederlands Deutsch
      Bahasa Indonesia Русский
      中文 Filipino
      Lietuvių kalba 日本語
      Suomi עברית
      Italiano Česky
      Hrvatski Slovensky
      Български Latviešu
      Estonian
  • Langue
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • •LUA - edytor pokoju•
« ‹ 2 / 20 › »
•LUA - edytor pokoju•
Kiriami
« Citoyen »
1388216160000
    • Kiriami#0000
    • Profil
    • Derniers messages
    • Tribu
#21
  0
WOW XD
Rohere
1389273720000
    • Rohere#0000
    • Profil
    • Derniers messages
    • Tribu
#22
[Modéré par Coska]
Xateusz
1390931820000
    • Xateusz#0000
    • Profil
    • Derniers messages
#23
[Modéré par Coska, raison : Post odbiegający od tematu.~]
Lisyzzz
« Citoyen »
1391814780000
    • Lisyzzz#1185
    • Profil
    • Derniers messages
#24
  0
I tak nie rozumiem ;/
Rohere
« Consul »
1392651900000
    • Rohere#0000
    • Profil
    • Derniers messages
    • Tribu
#25
  0
Nie rozumiem, łącze dobrze i dalej error np:

Ja a dit :
function eventNewGame()
for nick in pairs(tfm.get.room.playerList) do
tfm.exec.bindKeyboard(nick,32,true)
end
end
function eventKeyboard(nick,klaw)
if klaw==32 then
tfm.exec.movePlayer(nick,0,0,true,0,-50,true)
end
end

for nick in pairs(tfm.get.room.playerList) do
system.bindMouse(nick,true)
end
function eventMouse(nick,x,y)
tfm.exec.addShamanObject(tfm.enum.shamanObject.littleBox,x,y)
end
end
Ouake
« Censeur »
1392665460000
    • Ouake#0000
    • Profil
    • Derniers messages
    • Tribu
#26
  1
^ Cały kod psuje tylko ten ostatni " end", który zresztą nie wiem skąd sie tam pojawił.
Rohere
1392732240000
    • Rohere#0000
    • Profil
    • Derniers messages
    • Tribu
#27
[Modéré par Coska]
Rohere
« Consul »
1395667680000
    • Rohere#0000
    • Profil
    • Derniers messages
    • Tribu
#28
  0
Ouake, czy jest więcej tych funkcji, np: print(String coś)???

Dernière modification le 1510486740000
Ouake
« Censeur »
1395691260000
    • Ouake#0000
    • Profil
    • Derniers messages
    • Tribu
#29
  1
Ale o co dokładnie chodzi? Wszystkie funkcje, które może używać każdy gracz są wypisane w punkcie 7.

I bym był wdzięczny gdybyś mógł usunąć ze swojego postu chociaż 1 z kodów, troche spamowo to wygląda.

PS: [ Topic-643683 ]"Moje minigry"
Piotrkapeluh
« Citoyen »
1396026720000
    • Piotrkapeluh#0000
    • Profil
    • Derniers messages
    • Tribu
#30
  0
Ouake a dit :
^ Cały kod psuje tylko ten ostatni " end", który zresztą nie wiem skąd sie tam pojawił.

pls
Ouake
« Censeur »
1398435060000
    • Ouake#0000
    • Profil
    • Derniers messages
    • Tribu
#31
  1
Hej, jeżeli dopiszę sobie tutaj funkcje z gwiazdką ([url=?s=451587&p=0][•][/url]), będzie Wam to przeszkadzać?
Basterfeild
« Citoyen »
1398442980000
    • Basterfeild#0000
    • Profil
    • Derniers messages
#32
  0
Ouake a dit :
Hej, jeżeli dopiszę sobie tutaj funkcje z gwiazdką ([url=?s=451587&p=0][•][/url]), będzie Wam to przeszkadzać?

Nie.
Gavus
« Citoyen »
1398965760000
    • Gavus#0000
    • Profil
    • Derniers messages
    • Tribu
#33
  0
Ja nadal z tego nic nie rozumiem.
Myszkangel
1400231160000
    • Myszkangel#0000
    • Profil
    • Derniers messages
#34
[Modéré par Coska]
Aniolkaa
« Citoyen »
1400674260000
    • Aniolkaa#0000
    • Profil
    • Derniers messages
    • Tribu
#35
  0
Ouake a zrobisz taką mini gre nazwa #Oulua12
ze jest takie drzewko w którym jest dom itd?
Ouake
« Censeur »
1400691660000
    • Ouake#0000
    • Profil
    • Derniers messages
    • Tribu
#36
  1
Taka "minigra" bardziej będzie polegać na wyglądzie drzewa niż na budowie w sensie gruntów. W drugim nie ma żadnego problemu, ale jeżeli mam narysować te drzewo to już może być troche gorzej, bo z tego prędzej wyjdzie strach na wróble...
Aniolkaa
« Citoyen »
1401117000000
    • Aniolkaa#0000
    • Profil
    • Derniers messages
    • Tribu
#37
  0
nie umiem :( pierwszy raz to widze
wpisałam
function eventChatCommand(Kiriami,message)
if message=="wampir" then
tfm.exec.giveVampire(Kiriami)
end
if message=="latam" then
tfm.exec.setFly(Kiriami)
end
end

i nic sie nie dzieje (nie znam zabardzo angielskiego ;c

//

o co chodzi!? ## Init Error : [string "Aniolkaa.lua"]:4: 'end' expected (to close 'if' at line 2)
## [Aniolkaa] Lua script loaded in 1 ms (4000 max)
Aniolkaa
1401119820000
    • Aniolkaa#0000
    • Profil
    • Derniers messages
    • Tribu
#38
[Modéré par Coska]
Aanguson
« Citoyen »
1401124440000
    • Aanguson#8461
    • Profil
    • Derniers messages
#39
  0
Aniolkaa a dit :
nie umiem :( pierwszy raz to widze
wpisałam
function eventChatCommand(Kiriami,message)
if message=="wampir" then
tfm.exec.giveVampire(Kiriami)
end
if message=="latam" then
tfm.exec.setFly(Kiriami)
end
end

i nic sie nie dzieje (nie znam zabardzo angielskiego ;c

Latanie trzeba zbindować:

Kod a dit :

A01={}
for playerName in pairs(tfm.get.room.playerList) do
tfm.exec.bindKeyboard(playerName,32,true)
A01[playerName]=0
end

function eventChatCommand(playerName,command)
if command=="fly" then
A01[playerName]=1
elseif command=="stop" then
A01[playerName]=0
elseif command=="vampire" then
tfm.exec.setVampirePlayer(playerName)
end
end

function eventKeyboard(playerName,keyCode,down,xPlayerPosition,yPlayerPosition)
if keyCode==32 and A01[playerName]==1 then
tfm.exec.movePlayer(name,0,0,true,0,-50,false)
end
end

!vampire
!fly - latanie
!stop - wylacza latanie
Aniolkaa a dit :
o co chodzi!? ## Init Error : [string "Aniolkaa.lua"]:4: 'end' expected (to close 'if' at line 2)
## [Aniolkaa] Lua script loaded in 1 ms (4000 max)

Ten bład pokazuje się, gdy funkcja lub inna linia jest nie zamnięta.
Ouake
« Censeur »
1401129300000
    • Ouake#0000
    • Profil
    • Derniers messages
    • Tribu
#40
  1
5. End
Tak więc kiedy i ile razy trzeba użyć wpisu "end"? Służy on do zamykania jeszcze otwartej funkcji, ale zamyka tylko 1 stopień, jeżeli ma kilka np. warunek, wtedy ma 2 stopnie i potrzebne są 2 end'y. Co otwiera nowy stopień? Są to 'function', 'if', 'for', 'while' i 'repeat' - każdy trzeba osobno zamykać. Oprócz tego jest jeszcze 'elseif' i 'else', które można wpisać w miejsce "end" od 'if', ale ostatni 'elseif' czy 'else' trzeba zamknąć przez 'end'.
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • •LUA - edytor pokoju•
« ‹ 2 / 20 › »
© Atelier801 2018

Equipe Conditions Générales d'Utilisation Politique de Confidentialité Contact

Version 1.27