×

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
« ‹ 4 / 17 › »
[Module API] Errors
Zyx
« Censeur »
1384025940000
    • Zyx#8690
    • Profil
    • Derniers messages
#61
  0
Hophipmice a dit :
print(<<"Hi, welcome to snowball! This isn't a approved nor offical minigame, and it's only run in Tribe Houses. Have fun!">>)

What on earth are the << and >> for...

Tailtong a dit :
What on earth is anything in that code for, actually?

Swirlfire a dit :

This is NOT my code.

^..

I don't know since I'm not a expert, I'll notify..
Tailtong
« Citoyen »
1384026360000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#62
  0
Yeah, I saw that but..
a dit :

print(<<"Hi, welcome to snowball! This isn't a approved nor offical minigame, and it's only run in Tribe Houses. Have fun!">>) < and > are useless

tfm.exec.newGame won't play a map
if start then no variable called start

tfm.exec.setShaman(nil) you could just disable shaman
if nil then i don't even know anymore

table = { table not ended

(game, lava, kill, jump, shaman) should be "game","lava","kill","jump","shaman"

tfm.exec.message(It's now your turn, playername -- !") will turn out really weird

ui.Popup.set("Welcome to snowball! This is a game where you have to avoid blocks that have unexcpected lava in them. If the shaman dies when crossing, one mouse goes and then on and on.") there is nothing called ui.Popup.set

end what are you ending
end what are you ending 2

Almost everything in the code seems so wrong to me..

In before Shamousey.
Zyx
« Censeur »
1384028640000
    • Zyx#8690
    • Profil
    • Derniers messages
#63
  0
Tailtong a dit :
Yeah, I saw that but..


Almost everything in the code seems so wrong to me..

In before Shamousey.

Thank you I'll notify that to him and fix it..
Eviltrones
1384774380000
    • Eviltrones#8314
    • Profil
    • Derniers messages
#64
[Modéré par Bolinboy, raison : not english]
Barsems
« Citoyen »
1384867920000
    • Barsems#0000
    • Profil
    • Derniers messages
#65
  0
Friends I'm trying this code, but does not

eventKeyboard(playerName,32,down,220,100)
tfm.exec.bindKeyboard(playerName,32,down,true)
ui.addPopup(3,0," Slm ",playerName,220,100,360);
end
end
end

Init Error: transformice.lua: 274: [string "transformice.lua"]: 87:'' expected
[Barsems] Lua script loaded in 1 ms (4000 max)

Says please help. The meantime, I am from Turkey
Safwanrockz
« Censeur »
1384880100000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#66
  0
Barsems a dit :
Friends I'm trying this code, but does not

eventKeyboard(playerName,32,down,220,100)
tfm.exec.bindKeyboard(playerName,32,down,true)
ui.addPopup(3,0," Slm ",playerName,220,100,360);
end
end
end

Init Error: transformice.lua: 274: [string "transformice.lua"]: 87:'' expected
[Barsems] Lua script loaded in 1 ms (4000 max)

Says please help. The meantime, I am from Turkey

I assume you can't define the eventKeyboard strings as integers, and no need to the three ends, also the third argument of the tfm.exec.bindKeyboard function is boolean.
a dit :

eventKeyboard(playerName,key,down,x,y)
tfm.exec.bindKeyboard(playerName,32,true,true)
ui.addPopup(3,0," Slm ",playerName,x,y,360)
end

 
Barsems
« Citoyen »
1384957440000
    • Barsems#0000
    • Profil
    • Derniers messages
#67
  0
I tried, but

eventKeyboard(playerName,key,down,x,y)
tfm.exec.bindKeyboard(playerName,32,true,true)
ui.addPopup(3,0," Slm ",playerName,220,100,360)
end

Init Error: transformice.lua: 141: [string "transformice.lua"]: 88:'' expected
  Lua script loaded in 1 ms (4000 max)

he says.
Leafileaf
« Citoyen »
1384958280000
    • Leafileaf#0000
    • Profil
    • Derniers messages
    • Tribu
#68
  0
Barsems a dit :
I tried, but

eventKeyboard(playerName,key,down,x,y)
tfm.exec.bindKeyboard(playerName,32,true,true)
ui.addPopup(3,0," Slm ",playerName,220,100,360)
end

Init Error: transformice.lua: 141: [string "transformice.lua"]: 88:'' expected
  Lua script loaded in 1 ms (4000 max)

he says.

function eventKeyboard(playerName,key,down,x,y)
tfm.exec.bindKeyboard(playerName,32,true,true)
ui.addPopup(3,0," Slm",playerName,220,100,360)
end

By the way, eventKeyboard is an event (that sounds dumb) but anyway. You have to bind the key beforehand before the event will be called by Transformice. Unless you binded some other key somewhere and want the space to be binded when you press that other key.
Enginfener
« Citoyen »
1384986720000
    • Enginfener#0000
    • Profil
    • Derniers messages
    • Tribu
#69
  0
Runtime Error : transformice.lua:122: attempt to get length of nil
Shamousey
« Consul »
1384988280000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#70
  0
Enginfener a dit :
Runtime Error : transformice.lua:122: attempt to get length of nil

The opening post says something that you need to do in order to get help with this error (which is already covered in this thread so you should be able to find out how to fix it).

a dit :
If you still need help, post your ENTIRE code as a reply to this thread, explain what you expected to happen, and mention the error that's coming up.

 
Enginfener
« Citoyen »
1385065800000
    • Enginfener#0000
    • Profil
    • Derniers messages
    • Tribu
#71
  0
Leafileaf a dit :
function eventKeyboard(playerName,key,down,x,y)
tfm.exec.bindKeyboard(playerName,32,true,true)
ui.addPopup(3,0," Slm",playerName,220,100,360)
end

By the way, eventKeyboard is an event (that sounds dumb) but anyway. You have to bind the key beforehand before the event will be called by Transformice. Unless you binded some other key somewhere and want the space to be binded when you press that other key.

^^

Shamousey a dit :
The opening post says something that you need to do in order to get help with this error (which is already covered in this thread so you should be able to find out how to fix it). 

ty
Enginfener
1385066460000
    • Enginfener#0000
    • Profil
    • Derniers messages
    • Tribu
#72
[Modéré par Icewolfbob, raison : Merged double post - Please do not double post. You should edit your previous post instead. Thanks!]
Xanmeow
« Citoyen »
1385758440000
    • Xanmeow#0000
    • Profil
    • Derniers messages
    • Tribu
#73
  0
admins = {'Xanmeow', 'Swirlfire'}

tfm.exec.setNameColor("Xanmeow", 0xFC7500)

tfm.exec.setNameColor("Swirlfire", 0xFC7500)


players = {}
for name,player in pairs(tfm.get.room.playerList) do
table.insert(players,name)
end
tfm.exec.setVampirePlayer(players[math.random(#players)])

tfm.exec.setUIMapName("Vampire Minigame")
tfm.exec.setUIShamanName("*God")

function eventNewPlayer(name)
tfm.exec.bindKeyboard(name,32,true,true)
end

for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end

function eventKeyboard(name,key,down,x,y)
if key==32 then
tfm.exec.movePlayer(name,0,0,true,0,-50,false)
end
end

print("<ROSE> e] (" Welcome to Vampirette! This is a game where someone is randomly chosen to be a vampire! Admins have orange names if you are wondering! There will be a thread in forums when I get most of the game! ")
tfm.exec.disableAutoNewGame(true)
maps=(4496304,4498476)

seems right to me... I dont understand what is wrong
Shamousey
« Consul »
1385758920000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#74
  0
a dit :
print("&lt;ROSE&gt; e] (" Welcome to Vampirette! This is a game where someone is randomly chosen to be a vampire! Admins have orange names if you are wondering! There will be a thread in forums when I get most of the game! ")

You have (" there twice whil it's only needed once, which may be your problem.
Zyx
« Censeur »
1385759220000
    • Zyx#8690
    • Profil
    • Derniers messages
#75
  0
Shamousey a dit :
You have (" there twice whil it's only needed once, which may be your problem.

She has this now :

[•] Init Error : transformice.lua:34: [string "transformice.lua"]:31: unexpected symbol
Xanmeow
« Citoyen »
1385759340000
    • Xanmeow#0000
    • Profil
    • Derniers messages
    • Tribu
#76
  0
Swirlfire a dit :
She has this now :

[•] Init Error : transformice.lua:34: [string "transformice.lua"]:31: unexpected symbol

I had that but then eventually I got this: [•] Init Error : transformice.lua:34: [string "transformice.lua"]:23: ')' expected

my script a dit :
admins = {'Xanmeow', 'Swirlfire'}

tfm.exec.setNameColor("Xanmeow", 0xFC7500)

tfm.exec.setNameColor("Swirlfire", 0xFC7500)


players = {}
for name,player in pairs(tfm.get.room.playerList) do
table.insert(players,name)
end
tfm.exec.setVampirePlayer(players[math.random(#players)])

tfm.exec.setUIMapName("Vampire Minigame")
tfm.exec.setUIShamanName("*God")

function eventNewPlayer(name)
tfm.exec.bindKeyboard(name,32,true,true)
end

for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end(name,0,0,true,0,-50,false)
end
end

print( <ROSE> e) (" Welcome to Vampirette! This is a game where someone is randomly chosen to be a vampire! Admins have orange names if you are wondering! There will be a thread in forums when I get most of the game! ")
tfm.exec.disableAutoNewGame(true)
maps=(4496304,4498476)

.
Shamousey
« Consul »
1385759820000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#77
  0
Take a look at line 23. end(name,0,0,true,0,-50,false) this isn't valid at all, from the look of it these are the arguments for movePlayer.
Epicshawty
« Citoyen »
1385762400000
    • Epicshawty#0000
    • Profil
    • Derniers messages
    • Tribu
#78
  0
Xanmeow a dit :
I had that but then eventually I got this: [•] Init Error : transformice.lua:34: [string "transformice.lua"]:23: ')' expected
.

bad script
most of these aren't even valid
Xanmeow
« Citoyen »
1385926740000
    • Xanmeow#0000
    • Profil
    • Derniers messages
    • Tribu
#79
  0
so maybe could I have a script that has the same functions but works?
Safwanrockz
« Censeur »
1385927400000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#80
  0
Xanmeow a dit :
so maybe could I have a script that has the same functions but works?

1) remove the arguments after the end which shamo pointed out
2) use this as the last print:
print("<ROSE>Welcome to Vampirette! This is a game where someone is randomly chosen to be a vampire! Admins have orange names if you are wondering! There will be a thread in forums when I get most of the game!</ROSE>")
3) tables use the "curly" brackets, not normal brackets:
maps={4496304,4498476}
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • [Module API] Errors
« ‹ 4 / 17 › »
© Atelier801 2018

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

Version 1.27