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

io.open

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

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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