Jump to content




Wiki turtorial mistake?


  • You cannot reply to this topic
11 replies to this topic

#1 Mr Sabazio

  • New Members
  • 5 posts
  • LocationKtown Az

Posted 24 June 2012 - 06:22 PM

Well i tried to use the Advanced password protected door code from the wiki, and I get this error, which I'm having trouble fixing. If someone can help It would be greatly appreciated. also I'm using version 1.3
ERROR
Spoiler
PROGRAM
Spoiler
WIKI CODE
Spoiler


#2 cant_delete_account

  • Members
  • 484 posts

Posted 24 June 2012 - 06:29 PM

On it.
(Fixing wiki)

#3 cant_delete_account

  • Members
  • 484 posts

Posted 24 June 2012 - 06:31 PM

Ok, try remove the brackets from the if, so like this:
if input == (password) then
to this:
if input == password then


#4 Mr Sabazio

  • New Members
  • 5 posts
  • LocationKtown Az

Posted 24 June 2012 - 06:36 PM

hey thanks for helping
=]

#5 Mr Sabazio

  • New Members
  • 5 posts
  • LocationKtown Az

Posted 24 June 2012 - 07:05 PM

actually the password is always incorrect this way
=[

#6 Aerik

  • New Members
  • 15 posts

Posted 24 June 2012 - 07:42 PM

Try writing
if input == ("password") then
Not sure if this'll help, but the first thing that occurred to me

#7 Mr Sabazio

  • New Members
  • 5 posts
  • LocationKtown Az

Posted 24 June 2012 - 07:46 PM

View PostAerik, on 24 June 2012 - 07:42 PM, said:

Try writing
if input == ("password") then
Not sure if this'll help, but the first thing that occurred to me
Winning!
thanks you very much

#8 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 24 June 2012 - 07:48 PM

The code is fine and it should work, with or without the brackets.
Maybe it was a typo when copying it.

View PostMr Sabazio, on 24 June 2012 - 07:46 PM, said:

View PostAerik, on 24 June 2012 - 07:42 PM, said:

Try writing
if input == ("password") then
Not sure if this'll help, but the first thing that occurred to me
Winning!
thanks you very much
It works, but the password will always be "password", if you change it at the top (where it says local password = "password") it will have no effect.

#9 Pinkishu

  • Members
  • 484 posts

Posted 24 June 2012 - 07:49 PM

Uhm, using a variable doesn't make much sense then
input == password
should work fine, if it doesn't theres something else wrong

#10 Bossman201

  • New Members
  • 92 posts

Posted 24 June 2012 - 10:17 PM

View PostPinkishu, on 24 June 2012 - 07:49 PM, said:

Uhm, using a variable doesn't make much sense then
input == password
should work fine, if it doesn't theres something else wrong

if input == "password" then
No reason to use a variable in such a short program other than to add overhead. Just do a string check and take out variable declaration. Not sure why variable was enclosed with parentheses either, just increases program size.

#11 Pinkishu

  • Members
  • 484 posts

Posted 24 June 2012 - 10:42 PM

View PostBossman201, on 24 June 2012 - 10:17 PM, said:

View PostPinkishu, on 24 June 2012 - 07:49 PM, said:

Uhm, using a variable doesn't make much sense then
input == password
should work fine, if it doesn't theres something else wrong

if input == "password" then
No reason to use a variable in such a short program other than to add overhead. Just do a string check and take out variable declaration. Not sure why variable was enclosed with parentheses either, just increases program size.

Well it had one at top though :P/>
And programs can always grow bigger - plan ahead

#12 Mr Sabazio

  • New Members
  • 5 posts
  • LocationKtown Az

Posted 25 June 2012 - 04:01 PM

well if it isnt the () around password on line 9, what else would it be?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users