×

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
« ‹ 9 / 17 › »
[Module API] Errors
Shamousey
« Consul »
1393837920000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#161
  0
Immagetcheez a dit :
So I'm really confused

Are modules down? Or am typing things wrong? The only room I've connected to succesfully was PewPew.

*extremely late response ;;*

The servers were acting a little derpy last week, it all seems to be sorted now though, luckily!
Khagdt
1393839720000
    • Khagdt#0000
    • Profil
    • Derniers messages
#162
[Modéré par Bolinboy, raison : Spam.]
Ygtyk
« Citoyen »
1393972440000
    • Ygtyk#0000
    • Profil
    • Derniers messages
    • Tribu
#163
  0
I got ## Init Error : Ygtyk.lua:4: attempt to index ? (a nil value)
## [Ygtyk] Lua script loaded in 1 ms (4000 max) s
And i did every thing write my script was

-- hello.lua
-- the first program in every language

io.write("Hello world, from ",_VERSION,"!\n")
Shamousey
« Consul »
1393975800000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#164
  0
As stated in the Module API FAQ.

a dit :
• io.write, io.read, and the rest of the io package don't exist.

Not all Lua functions are available in Transformice, you can see which ones are available in the documentation in the announcements board.
Ygtyk
« Citoyen »
1393976160000
    • Ygtyk#0000
    • Profil
    • Derniers messages
    • Tribu
#165
  0
Shamousey a dit :
As stated in the Module API FAQ.
Not all Lua functions are available in Transformice, you can see which ones are available in the documentation in the announcements board.

Oh ok ty
Abdeltif
« Citoyen »
1394651760000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#166
  0
Shamousey a dit :
As stated in the Module API FAQ.
Not all Lua functions are available in Transformice, you can see which ones are available in the documentation in the announcements board.

And loadscript / loadfile doesn't exist either.
and MANY other modules arean't in the Transformice Lua Library
Safwanrockz
« Censeur »
1394656740000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#167
  0
Abdeltif a dit :
And loadscript / loadfile doesn't exist either.
and MANY other modules arean't in the Transformice Lua Library

It's pretty unquestionable that these don't exist (loadscript/loadfile would make no sense if embedded within TFM's Lua library). Unlike the io package, io.write() would likely do what print() does, and io.read() would take the chat command as a user input, hence why Shamo stated this.
Cocotaman
1394846460000
    • Cocotaman#0000
    • Profil
    • Derniers messages
#168
[Modéré par Takumisyn, raison : Spam]
Zutto
« Citoyen »
1395514620000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#169
  0
a dit :
n = 1
h = 0
while n < 100 do
if n%3 == 0 then
print(n)
h=h+1
n=n+1
print("huehuehue")
end
end

## Init Error : Aritxy.lua:4: Lua destroyed : Runtime too long!

Why?
Moepl
« Citoyen »
1395518160000
    • Moepl#0095
    • Profil
    • Derniers messages
#170
  0
Aritxy a dit :


## Init Error : Aritxy.lua:4: Lua destroyed : Runtime too long!

Why?

Think about where you need to place your "end"s. Indentions don't matter in lua.
Abdeltif
« Citoyen »
1395617640000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#171
  0
Aritxy a dit :


## Init Error : Aritxy.lua:4: Lua destroyed : Runtime too long!

Why?

n will always be the same so the loop will be infinit
and simply : n(with is 1)%3 == 1
Infinit loop, TFM = ERROR ! ERROR ! ERROR ! screwing machine &amp;amp;amp;gt;.&amp;amp;amp;gt;
So, you need to order your code
n=n+1 should be the first line in the loop
Then it checks if it is divisible by 3
Did you mean this ?:
a dit :

n = 1
h = 0
while n < 100 do
n = n + 1
if n%3 == 0 then
print(n)
h=h+1
end
end
print("huehuehue")
Magicdasha
« Citoyen »
1395846900000
    • Magicdasha#0000
    • Profil
    • Derniers messages
#172
  0
## Init Error : Ediz.lua:274: [string "Magicdasha.lua"]:15: unexpected symbol

how i fix that?
Epicsouris
« Citoyen »
1395869640000
    • Epicsouris#0000
    • Profil
    • Derniers messages
#173
  0
Magicdasha a dit :
## Init Error : Ediz.lua:274: [string "Magicdasha.lua"]:15: unexpected symbol

how i fix that?

It means on line 15 of your code, there is a problem
Abdeltif
« Citoyen »
1395925320000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#174
  0
Magicdasha a dit :
## Init Error : Ediz.lua:274: [string "Magicdasha.lua"]:15: unexpected symbol

how i fix that?

a dit :

tbl = [15,"string",true]

ERROR : unexpected symbol
Why ?
To create a table, all of the key-values must be betweed { and }
Instead of putting { I wrote [
[ and ] are unexpected symbols
This is just an example, you wrote something wrong in line 15 then.
Souscared
« Citoyen »
1395965640000
    • Souscared#0000
    • Profil
    • Derniers messages
    • Tribu
#175
  0
Doge in #control??? SO FUN! XD
Fiermousel
« Citoyen »
1396003200000
    • Fiermousel#0000
    • Profil
    • Derniers messages
    • Tribu
#176
  0
Edited
Makinit
« Citoyen »
1396018380000
    • Makinit#0095
    • Profil
    • Derniers messages
    • Tribu
#177
  0
Fiermousel a dit :
What is error ?


## Runtime Error : Fiermousel.lua:13: attempt to index ? (a nil value)

First you define the variable players as table and add keys and values:
players={}
keys[name] = {} system.bindMouse(name, true)

Then you use it to iterate through the playerList which overwrites it:
for name,players in pairs(tfm.get.room.playerList) do

Then you try to use a key that only exists in the table that was overwritten:
if players[name].removeTime==0 then

You will probably want to use two different variables for this.
Zutto
« Citoyen »
1396461180000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#178
  0
## Init Error : multiple points

OMG

This:
version=0.0.2

fixed, I wrote string
Fatihmilano
« Citoyen »
1396632420000
    • Fatihmilano#0000
    • Profil
    • Derniers messages
    • Tribu
#179
  0
LUA broken...
+Minstens
« Citoyen »
1396640640000
    • +Minstens#0000
    • Profil
    • Derniers messages
    • Tribu
#180
  0
Fatihmilano a dit :
LUA broken...

Yep.
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • [Module API] Errors
« ‹ 9 / 17 › »
© Atelier801 2018

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

Version 1.27