×

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
  • /
  • [Module API] Errors
« ‹ 12 / 17 › »
[Module API] Errors
Begoxary
« Citoyen »
1407343560000
    • Begoxary#0000
    • Profil
    • Derniers messages
    • Tribu
#221
  0
I just found another error, Runtime error: attempt to index ? (a nil value)


It gave me a line and is not anything wrong in it.
Shamousey
« Consul »
1407343800000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#222
  0
Begoxary a dit :
I just found another error, Runtime error: attempt to index ? (a nil value)

It gave me a line and is not anything wrong in it.

The issue isn't necessarily on that line, but it could be lines around it. As it's referring to a nil value, whatever you're trying to get is never initially created. If you want help, I recommend you read the opening post, in particular:

a dit :
If you've encountered an error in your code, please read over this thread to try and solve it. If you still need help, post your ENTIRE code as a reply to this thread
Begoxary
« Citoyen »
1407344760000
    • Begoxary#0000
    • Profil
    • Derniers messages
    • Tribu
#223
  0
Shamousey a dit :
Begoxary a dit :
I just found another error, Runtime error: attempt to index ? (a nil value)

It gave me a line and is not anything wrong in it.

The issue isn't necessarily on that line, but it could be lines around it. As it's referring to a nil value, whatever you're trying to get is never initially created. If you want help, I recommend you read the opening post, in particular:

a dit :
If you've encountered an error in your code, please read over this thread to try and solve it. If you still need help, post your ENTIRE code as a reply to this thread


Oh thank you!

I've fixed it :D
Pyxelz
1409274660000
    • Pyxelz#6100
    • Profil
    • Derniers messages
#224
[Modéré par Sabusha, raison : Off topic]
Echoflower
« Citoyen »
1411243080000
    • Echoflower#0000
    • Profil
    • Derniers messages
    • Tribu
#225
  0
The scripts that other people made worked long time ago, but when I tried it this time, it gave me Init Error : 110678, Init Error : 110688
It wasn't just one script, all the scripts I tried didn't work
Jordy
« Consul »
1411246680000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#226
  0
echoflower a dit :
The scripts that other people made worked long time ago, but when I tried it this time, it gave me Init Error : 110678, Init Error : 110688
It wasn't just one script, all the scripts I tried didn't work

The scripts you try to load are probably still working, but LUA is a bit broken in tribe houses right now.
The number after Init Error displays how much players tried to run a lua script.

Dernière modification le 1411246920000
Leeyangyi
« Citoyen »
1414651920000
    • Leeyangyi#0000
    • Profil
    • Derniers messages
    • Tribu
#227
  0
i suck at lua so help me.
for players in pairs(tfm.get.room.playerList) do
tfm.exec.bindKeyboard(playerName, 32, true, true)
function eventKeyboard(playerName, keyCode, True, x, y)
if key==32 then
tfm.exec.respawnPlayer(playerName)
end
end
end
tfm.exec.bindKeyboard : argument 1 can't be NIL.
Shamousey
« Consul »
1414678440000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#228
  0
Change

"for players in pairs(tfm.get.room.playerList) do"

to

"for playerName,player in pairs(tfm.get.room.playerList) do"
Itchyboy
« Citoyen »
1414710960000
    • Itchyboy#0000
    • Profil
    • Derniers messages
    • Tribu
#229
  0
Leeyangyi a dit :
i suck at lua so help me.
for players in pairs(tfm.get.room.playerList) do
tfm.exec.bindKeyboard(playerName, 32, true, true)
function eventKeyboard(playerName, keyCode, True, x, y)
if key==32 then
tfm.exec.respawnPlayer(playerName)
end
end
end
tfm.exec.bindKeyboard : argument 1 can't be NIL.

You may want to change it to this:
function eventNewPlayer(name)
tfm.exec.bindKeyboard(name,32,true,true)
end
for i,v in pairs(tfm.get.room.playerList) do eventNewPlayer(i) end
function eventKeyboard(name,key,down,x,y)
if key==32 then tfm.exec.respawnPlayer(name)
end
end

Dernière modification le 1415751660000
Itchyboy
« Citoyen »
1416278340000
    • Itchyboy#0000
    • Profil
    • Derniers messages
    • Tribu
#230
  0
(I realize I'm double posting but I wanted people to see that there was a new post)
OK, so, I tried loading an XML with a chat command, but it said, "Argument must be integer." Here's my whole code: http://pastebin.com/VbQyjw2p.
The chat command is on line 326.
Shamousey
« Consul »
1416282780000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#231
  0
itchyboy a dit :
(I realize I'm double posting but I wanted people to see that there was a new post)
OK, so, I tried loading an XML with a chat command, but it said, "Argument must be integer." Here's my whole code: http://pastebin.com/VbQyjw2p.
The chat command is on line 326.

It looks like you're splitting your args table on each space character, and since an XML has spaces in it it's being split into multiple parts. You're actually trying to load the XML <C><P, the next argument would be L="2400" and so on.
Makinit
« Citoyen »
1416315300000
    • Makinit#0095
    • Profil
    • Derniers messages
    • Tribu
#232
  0
shamousey a dit :
itchyboy a dit :
(I realize I'm double posting but I wanted people to see that there was a new post)
OK, so, I tried loading an XML with a chat command, but it said, "Argument must be integer." Here's my whole code: http://pastebin.com/VbQyjw2p.
The chat command is on line 326.

It looks like you're splitting your args table on each space character, and since an XML has spaces in it it's being split into multiple parts. You're actually trying to load the XML &lt;C&gt;&lt;P, the next argument would be L="2400" and so on.

The actual cause of the error is that the < character is escaped as &amp;lt; in input from chat commands, so the first character is & which is not recognised as XML and parsing it as number fails. You should unescape it before passing it to the newGame function: tfm.exec.newGame(string.replace(input, "&amp;lt;", "<"))
Itchyboy
« Citoyen »
1416359820000
    • Itchyboy#0000
    • Profil
    • Derniers messages
    • Tribu
#233
  0
Oh, thank you, that's actually really smart
Zyx
« Censeur »
1417229940000
    • Zyx#8690
    • Profil
    • Derniers messages
#234
  0
My friend tried running a ffa bootcamp script which is pretty massive, and she got this error:

Init Error : [string "Pawgold.lua"]:74: 'then' expected

Part of the script she thinks is wrong:
if arg[1]=="ban"..playerName..""..command: sub(5), nil" and admin[name] then

It's at line 74
Ala_klopsik
1419162180000
    • Ala_klopsik#9685
    • Profil
    • Derniers messages
    • Tribu
#235
[Modéré par Shamousey, raison : Spam / adds nothing to the thread.]
Quesoyquesos
« Citoyen »
1419193920000
    • Quesoyquesos#0000
    • Profil
    • Derniers messages
    • Tribu
#236
  0
¡Hi, i'm coming to ES. I need a help form this script



function eventKeyboard(name, key, down, x,y)
if key==83 then
print(name..", poll: Sí")
end
end

for name, player in pairs(tfm.get.room.playerList) do
tfm.exec.bindKeyboard(name, 83,false,true)
end

function eventKeyboard(name, key, down, x,y)
if key==78 then
print(name..", poll: No")
end
end

for name, player in pairs(tfm.get.room.playerList) do
tfm.exec.bindKeyboard(name, 78,false,true)
end


Why the S key did not appear in print when the trouble? I need help, I'm noob with this (hahaha) :(
Neonstrayzer
« Citoyen »
1419194580000
    • Neonstrayzer#0000
    • Profil
    • Derniers messages
    • Tribu
#237
  0
quesoyquesos a dit :
¡Hi, i'm coming to ES. I need a help form this script



function eventKeyboard(name, key, down, x,y)
if key==83 then
print(name..", poll: Sí")
end
end

for name, player in pairs(tfm.get.room.playerList) do
tfm.exec.bindKeyboard(name, 83,false,true)
end

function eventKeyboard(name, key, down, x,y)
if key==78 then
print(name..", poll: No")
end
end

for name, player in pairs(tfm.get.room.playerList) do
tfm.exec.bindKeyboard(name, 78,false,true)
end


Why the S key did not appear in print when the trouble? I need help, I'm noob with this (hahaha) :(

function eventKeyboard(name, key, down, x,y)
if key==83 then
print(name..", poll: Sí")
end
if key==78 then
print(name..", poll: No")
end
end
for name, player in pairs(tfm.get.room.playerList) do
tfm.exec.bindKeyboard(name, 78,false,true)
tfm.exec.bindKeyboard(name, 83,false,true)
end
Itchyboy
« Citoyen »
1419200280000
    • Itchyboy#0000
    • Profil
    • Derniers messages
    • Tribu
#238
  0
quesoyquesos a dit :
¡Hi, i'm coming to ES. I need a help form this script



function eventKeyboard(name, key, down, x,y)
if key==83 then
print(name..", poll: Sí")
end
end

for name, player in pairs(tfm.get.room.playerList) do
tfm.exec.bindKeyboard(name, 83,false,true)
end

function eventKeyboard(name, key, down, x,y)
if key==78 then
print(name..", poll: No")
end
end

for name, player in pairs(tfm.get.room.playerList) do
tfm.exec.bindKeyboard(name, 78,false,true)
end


Why the S key did not appear in print when the trouble? I need help, I'm noob with this (hahaha) :(

The reason the first eventKeyboard() did not work is because you redefined it later.
Bushmeister
« Consul »
1422992880000
    • Bushmeister#0000
    • Profil
    • Derniers messages
    • Tribu
#239
  0
Why tfm.exec.removeObject(id) and tfm.exec.moveObject(id, x, y) don't work? What's the problem?
a dit :

tfm.exec.addShamanObject(54, 400, 200, 0, 0, 0, false)
tfm.exec.addShamanObject(54, 450, 200, 0, 0, 0, false)
tfm.exec.addShamanObject(54, 500, 200, 0, 0, 0, false)
tfm.exec.moveObject(54,200,100)
Safwanrockz
« Censeur »
1422998040000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#240
  0
Bushmeister a dit :
Why tfm.exec.removeObject(id) and tfm.exec.moveObject(id, x, y) don't work? What's the problem?
a dit :

tfm.exec.addShamanObject(54, 400, 200, 0, 0, 0, false)
tfm.exec.addShamanObject(54, 450, 200, 0, 0, 0, false)
tfm.exec.addShamanObject(54, 500, 200, 0, 0, 0, false)
tfm.exec.moveObject(54,200,100)


Because the ID argument in tfm.exec.moveObject() is the ID of the object which is returned from the function tfm.exec.addShamanObject();
id=tfm.exec.addShamanObject(54, 400, 200, 0, 0, 0, false)
tfm.exec.moveObject(id,200,100)
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • [Module API] Errors
« ‹ 12 / 17 › »
© Atelier801 2018

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

Version 1.27