×

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 Kodları Tartışma & Yardımlaşma Başlığı
« ‹ 285 / 388 › »
Lua Kodları Tartışma & Yardımlaşma Başlığı
Enesxfbxpro
« Censeur »
1410794760000
    • Enesxfbxpro#0000
    • Profil
    • Derniers messages
    • Tribu
#5681
  0
Hotspotower a dit :
Enesxfbxpro a dit :
Çok teşekkür ederim hotspotower. Edit: Çalışmadı .C


Bu arada bir sorum daha olacak. callback çalışıyormu? Benim yaptığım market kodunda tıklıyorum ancak sadece sarı oluyor tıklanabilir olmuyor. Diğer yapmış olduğum cümlenin tıklanabilir olmasını sağlıyorum çalışıyor nedense? Biri yardım edebilir mi?

http://i.imgur.com/e5Tpskp.png

if i kısmında 3 yazdım. 3 kişi kaldığında o olay olacak demek anlamına geliyor. Nasıl çalışmadı? Aynı fonksiyondan 2 kez yapmışsındır. Kontrol et.

Heh tamam birde fazla fonksiyon koymuşum birleştirdim şimdi, çalıştı sağol.


Şu hatayı nasıl çözebilirim. Satın al'a basınca basılmıyor sadece yeşil oluyor tıklanılır olmuyor. Yardım edecek varsa kodları vereceğim.

http://i.imgur.com/e5Tpskp.png
Neonstrayzer
« Citoyen »
1410794880000
    • Neonstrayzer#0000
    • Profil
    • Derniers messages
    • Tribu
#5682
  0
function eventTextAreaCallback(id,p,cb)
end
.
Enesxfbxpro
« Censeur »
1410795060000
    • Enesxfbxpro#0000
    • Profil
    • Derniers messages
    • Tribu
#5683
  0
neonstrayzer a dit :
function eventTextAreaCallback(id,p,cb)
end
.

Hyr, diğer yazıya tıklıyorum ve tıklanabilir oluyor ancak satın al yazısına basınca tıklanılmıyor. İstersen kodları vereyim?
Mengineer
« Citoyen »
1410798420000
    • Mengineer#0000
    • Profil
    • Derniers messages
    • Tribu
#5684
  0
Callback'de sorun yok. "Türkçe harf" kullanmadığından emin ol.
Neonstrayzer
« Citoyen »
1410798840000
    • Neonstrayzer#0000
    • Profil
    • Derniers messages
    • Tribu
#5685
  0
mengineer a dit :
Callback'de sorun yok. "Türkçe harf" kullanmadığından emin ol.

ui.addTextArea(0,"<a href='event:İıÖÜöü'>test")
function eventTextAreaCallback(id,p,cb)
if cb=="İıÖÜöü" then
print("test")
end
end
Enesxfbxpro
« Censeur »
1410862320000
    • Enesxfbxpro#0000
    • Profil
    • Derniers messages
    • Tribu
#5686
  0
Hala olmadı :(

Türkçe kelime de kullanmadım, ilk eventimde meep 50, diğerinde hız 100 yazılı.
Oyga
« Citoyen »
1410863580000
    • Oyga#0000
    • Profil
    • Derniers messages
    • Tribu
#5687
  0
Enesxfbxpro a dit :
Hala olmadı :(

Türkçe kelime de kullanmadım, ilk eventimde meep 50, diğerinde hız 100 yazılı.

http://atelier801.com/topic?f=6&t=778639
Enesxfbxpro
« Censeur »
1410864060000
    • Enesxfbxpro#0000
    • Profil
    • Derniers messages
    • Tribu
#5688
  0
Oyga a dit :
Enesxfbxpro a dit :
Hala olmadı :(

Türkçe kelime de kullanmadım, ilk eventimde meep 50, diğerinde hız 100 yazılı.

http://atelier801.com/topic?f=6&amp;t=778639

Hyr.
Oyga
« Citoyen »
1410864420000
    • Oyga#0000
    • Profil
    • Derniers messages
    • Tribu
#5689
  0
Düzenlendi.

Dernière modification le 1410865860000
Enesxfbxpro
« Censeur »
1410869580000
    • Enesxfbxpro#0000
    • Profil
    • Derniers messages
    • Tribu
#5690
  0
Tamam gerek kalmadı, en baştan kodladım marketi ancak bir sorum daha var, İki fonksiyonu aynı anda çağırıyorum bunun için ne yapabilirim?

function shoop(n)
function eventLoop(ct,tr)
for n,player in pairs(tfm.get.room.playerList) do
if(tfm.get.room.playerList[name].movingLeft) then
tfm.exec.movePlayer(name,nil,nil,false,-100,nil,false)
else if(tfm.get.room.playerList[name].movingRight) then
tfm.exec.movePlayer(name,nil,nil,false,100,nil,false)
end
end
end
end
end
Mengineer
« Citoyen »
1410871860000
    • Mengineer#0000
    • Profil
    • Derniers messages
    • Tribu
#5691
  0
O iki fonksiyonu yazarmısın?
Enesxfbxpro
« Censeur »
1410872820000
    • Enesxfbxpro#0000
    • Profil
    • Derniers messages
    • Tribu
#5692
  0
mengineer a dit :
O iki fonksiyonu yazarmısın?

function shoop(n)
function eventLoop(ct,tr)

for n,player in pairs(tfm.get.room.playerList) do
if(tfm.get.room.playerList[name].movingLeft) then
tfm.exec.movePlayer(name,nil,nil,false,-100,nil,false)
else if(tfm.get.room.playerList[name].movingRight) then
tfm.exec.movePlayer(name,nil,nil,false,100,nil,false)
end
end
end
end
end
Mengineer
« Citoyen »
1410877860000
    • Mengineer#0000
    • Profil
    • Derniers messages
    • Tribu
#5693
  0
Ha, o anlamda mı.
functin shoop(n)
eventLoop(0,0)
end

-- eventLoop \/
Enesxfbxpro
« Censeur »
1410878400000
    • Enesxfbxpro#0000
    • Profil
    • Derniers messages
    • Tribu
#5694
  0
mengineer a dit :
Ha, o anlamda mı.
functin shoop(n)
eventLoop(0,0)
end

-- eventLoop \/

Dediğini yaptım ancak hata verdi:

function shoop(n)
eventLoop(ct,tr)
for n,player in pairs(tfm.get.room.playerList) do
if(tfm.get.room.playerList[name].movingLeft) then
tfm.exec.movePlayer(name,nil,nil,false,-100,nil,false)
else if(tfm.get.room.playerList[name].movingRight) then
tfm.exec.movePlayer(name,nil,nil,false,100,nil,false)
end
end
end
end
Hotspotower
« Citoyen »
1410878520000
    • Hotspotower#0000
    • Profil
    • Derniers messages
    • Tribu
#5695
  0
Enesxfbxpro a dit :
mengineer a dit :
Ha, o anlamda mı.
functin shoop(n)
eventLoop(0,0)
end

-- eventLoop \/

Dediğini yaptım ancak hata verdi:

function shoop(n)
eventLoop(ct,tr)
for n,player in pairs(tfm.get.room.playerList) do
if(tfm.get.room.playerList[name].movingLeft) then
tfm.exec.movePlayer(name,nil,nil,false,-100,nil,false)
else if(tfm.get.room.playerList[name].movingRight) then
tfm.exec.movePlayer(name,nil,nil,false,100,nil,false)
end
end
end
end

0,0 yaz demiş zaten.
Enesxfbxpro
« Censeur »
1410878700000
    • Enesxfbxpro#0000
    • Profil
    • Derniers messages
    • Tribu
#5696
  0
Hotspotower a dit :
Enesxfbxpro a dit :
mengineer a dit :
Ha, o anlamda mı.
functin shoop(n)
eventLoop(0,0)
end

-- eventLoop \/

Dediğini yaptım ancak hata verdi:

function shoop(n)
eventLoop(ct,tr)
for n,player in pairs(tfm.get.room.playerList) do
if(tfm.get.room.playerList[name].movingLeft) then
tfm.exec.movePlayer(name,nil,nil,false,-100,nil,false)
else if(tfm.get.room.playerList[name].movingRight) then
tfm.exec.movePlayer(name,nil,nil,false,100,nil,false)
end
end
end
end

0,0 yaz demiş zaten.

Yine aynı hata;

function shopp(n)
eventLoop(0,0)
for name,player in pairs(tfm.get.room.playerList) do
if(tfm.get.room.playerList[name].movingLeft) then
tfm.exec.movePlayer(name,nil,nil,false,-100,nil,false)
else if(tfm.get.room.playerList[name].movingRight) then
tfm.exec.movePlayer(name,nil,nil,false,100,nil,false)
end
end
end
end

Hata: [Lua] # [] Runtime Error : Enesxfbxpro.lua:97: attempt to call nil
97. satır: eventLoop(0,0)
Mengineer
« Citoyen »
1410882000000
    • Mengineer#0000
    • Profil
    • Derniers messages
    • Tribu
#5697
  0
function shopp(n)
eventLoop(0,0)
end
function eventLoop(t, rm)
for name,player in pairs(tfm.get.room.playerList) do
if(tfm.get.room.playerList[name].movingLeft) then
tfm.exec.movePlayer(name,nil,nil,false,-100,nil,false)
else if(tfm.get.room.playerList[name].movingRight) then tfm.exec.movePlayer(name,nil,nil,false,100,nil,false)
end
end
end
end
Enesxfbxpro
« Censeur »
1410890460000
    • Enesxfbxpro#0000
    • Profil
    • Derniers messages
    • Tribu
#5698
  0
Hyr demek istediğini anlamadın şöyle birşey yapmak istedim; Sa yazısına basınca hızlı gitmek gibi...

function eventTextAreaCallback(id,n,cb)
if cb=="sa"
shopp(n)
end

function shopp(n)
function eventLoop(ct,tr)

for n,player in pairs(tfm.get.room.playerList) do
if(tfm.get.room.playerList[name].movingLeft) then
tfm.exec.movePlayer(name,nil,nil,false,-100,nil,false)
else if(tfm.get.room.playerList[name].movingRight) then
tfm.exec.movePlayer(name,nil,nil,false,100,nil,false)
end
end
end
end
Neonstrayzer
« Citoyen »
1410894000000
    • Neonstrayzer#0000
    • Profil
    • Derniers messages
    • Tribu
#5699
  0
Enesxfbxpro a dit :
Hyr demek istediğini anlamadın şöyle birşey yapmak istedim; Sa yazısına basınca hızlı gitmek gibi...

function eventTextAreaCallback(id,n,cb)
if cb=="sa"
shopp(n)
end

function shopp(n)
function eventLoop(ct,tr)

for n,player in pairs(tfm.get.room.playerList) do
if(tfm.get.room.playerList[name].movingLeft) then
tfm.exec.movePlayer(name,nil,nil,false,-100,nil,false)
else if(tfm.get.room.playerList[name].movingRight) then
tfm.exec.movePlayer(name,nil,nil,false,100,nil,false)
end
end
end
end

fly adında bir tablo oluştur.
Kullanıcılar sa yazısına basınca fly

=true
Sonra loop ile döngüdeki kıllanıcıların en başına if fly[n] then şartını ekle.

Enesxfbxpro
« Censeur »
1410894600000
    • Enesxfbxpro#0000
    • Profil
    • Derniers messages
    • Tribu
#5700
  0
Lua kapalı galiba...

Neonstrayzer dediğini yapmaya çalıştım, luada hiç iyi değilim ama sanırsam yanlış :C. Şu functionu yapamıyorum.

fly={}
function eventNewPlayer(n)
fly[n]={fly=true}
end



for n in pairs(tfm.get.room.playerList) do
eventNewPlayer(n)
end

function shopp(n)
function eventLoop(t, rm)
for name,player in pairs(tfm.get.room.playerList) do
if(tfm.get.room.playerList[name].movingLeft) then
tfm.exec.movePlayer(name,nil,nil,false,-50,nil,false)
else if(tfm.get.room.playerList[name].movingRight) then tfm.exec.movePlayer(name,nil,nil,false,100,nil,false)
end
end
end
end

function eventTextAreaCallback(id,n,cb)
if cb=="bas" and p[n].money>=100 and fly[n] then
shopp(n)
end
end
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Lua Kodları Tartışma & Yardımlaşma Başlığı
« ‹ 285 / 388 › »
© Atelier801 2018

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

Version 1.27