×

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
  • /
  • Atelier 801
  • /
  • Hors-sujet
  • /
  • Lua script help (not transformice script)
Lua script help (not transformice script)
Jojololly
« Citoyen »
1403453460000
    • Jojololly#0000
    • Profil
    • Derniers messages
#1
  0
io.write("Enter a noun")
noun1 = io.read("*a")
io.write("And another")
noun2 = io.read("*b")
io.write("Now a present tense verb")
verb1 = io.read("*c")
io.write("A ", noun1, "was sitting at a table. Then a " noun2 , " who was " verb1, " came up to him.")

I'm just starting Lua and I just wrote this script and it's not working. Just wondering how I could make it work or a script that would do the same thing. (Sorry it's up there, I'm on a mobile device and I can't get it to come down) Thanks! ^^
Someusername
« Citoyen »
1403454900000
    • Someusername#0000
    • Profil
    • Derniers messages
#2
  0
io.write("Enter a noun ")
-- Added space, input text would be too close without, like "nounINPUT"
noun1 = io.read("*line")
-- Replaced "*a" with "*line"
io.write("And another ")
-- Added space, same reason as first
noun2 = io.read("*line")
-- Replaced "*b" with "*line"
io.write("Now a present tense verb ")
-- Added space, same reason as first
verb1 = io.read("*line")
-- Replaced "*c" with "*line"
io.write("A ", noun1, " was sitting at a table. Then a ", noun2 , " who was ", verb1, " came up to him.")
-- Added space, added a ",", and added a ","


Output with input being 1, 2, and 3:
Enter a noun 1
And another 2
Now a present tense verb 3
A 1 was sitting at a table. Then a 2 who was 3 came up to him.

Dernière modification le 1403455140000
Jojololly
« Citoyen »
1403455500000
    • Jojololly#0000
    • Profil
    • Derniers messages
#3
  0
Someusername a dit :
io.write("Enter a noun ")
-- Added space, input text would be too close without, like "nounINPUT"
noun1 = io.read("*line")
-- Replaced "*a" with "*line"
io.write("And another ")
-- Added space, same reason as first
noun2 = io.read("*line")
-- Replaced "*b" with "*line"
io.write("Now a present tense verb ")
-- Added space, same reason as first
verb1 = io.read("*line")
-- Replaced "*c" with "*line"
io.write("A ", noun1, " was sitting at a table. Then a ", noun2 , " who was ", verb1, " came up to him.")
-- Added space, added a ",", and added a ","


Output with input being 1, 2, and 3:
Enter a noun 1
And another 2
Now a present tense verb 3
A 1 was sitting at a table. Then a 2 who was 3 came up to him.

Thanks so much!
  • Forums
  • /
  • Atelier 801
  • /
  • Hors-sujet
  • /
  • Lua script help (not transformice script)
© Atelier801 2018

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

Version 1.27