Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0

Question

1 answer to this question

Recommended Posts

  • 0

As a side note, always make your functions and variables `local`, that's the very first thing I noticed when reading your code. You'll want it to be `local checkAuthPlayer = function(p)`

Also, and it makes no operational difference, you could declare your functions: `local function checkAuthPlayer(p)` instead, if you like that style more

I'm not sure why this code doesn't work, but one thing to consider is that `io.open` uses relative paths if you don't use `/....` paths for files. Thus, `authPlayers` is searched in your current directory. Are you executing this script from a different directory?.

Does it throw an exception that the file was not found? [ I assume this is true  ]

Also, `r` is the default for `io.open`. It is totally fine to specify it, just thought I'd let you know

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.