Jump to content




help

computer lua help

7 replies to this topic

#1 joshgreat

  • Members
  • 33 posts

Posted 21 December 2016 - 02:22 PM

hey guys back at it again with the ask a pro. need help fixing this program it is the first file of WOS 2.0 soo ye.
-joshgreatuk

http://pastebin.com/nyX6jdGh

#2 Lupus590

  • Members
  • 1,962 posts
  • LocationUK

Posted 21 December 2016 - 03:28 PM

Gah my eyes!
Indent your code.
Posted Image

Also, what is the issue? Is there an error message? What is the code doing which is different from what you want it to be doing?

#3 houseofkraft

  • Members
  • 170 posts
  • LocationUSA

Posted 21 December 2016 - 09:36 PM

I found out the issue, Line 28 says

print("hi",u1,"your account has been made")
It should be
print("Hi "..u1..", You're account has successfully been created.")

EDIT: I also found another issue in your code. For line 69 to 74 you need to replace , with ..

Edited by houseofkraft, 21 December 2016 - 09:50 PM.


#4 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 21 December 2016 - 09:44 PM

Line 28 is a perfectly valid method of passing arguments to print.

#5 houseofkraft

  • Members
  • 170 posts
  • LocationUSA

Posted 21 December 2016 - 09:52 PM

I'm going to debug the code and see what is wrong with this.

EDIT: Line 59 and 62 should be fs.open not open

Edited by houseofkraft, 21 December 2016 - 09:58 PM.


#6 joshgreat

  • Members
  • 33 posts

Posted 24 December 2016 - 02:26 PM

tried that and it said
startup:60: attempt to call nil

#7 TheRockettek

  • Members
  • 547 posts
  • LocationRem is best girl

Posted 24 December 2016 - 02:33 PM

why you opening then closing files on lines 17-20. When using fs.open, it automatically creates the file if it doesnt exist so theres no point in that

#8 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 24 December 2016 - 04:25 PM

That should be
f.readAll()

I think you could gain a lot by checking out the wiki.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users