Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
Sign in to follow this  
Sasser

computer.addUser

Question

Hello

 

I'm a total noob when its comes to lua but usually i find a solution to things but not in this case.

 

Basically if someone can show the proper syntax for adding a user to a computer preferably with some examples.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Ive read the wiki but i dont understand it fully, so if i would add my self to the computer it would be ...

 

computer.addUser(Sasser)

 

Is that correct?

 

Unless that is a variable, you have to put quotes around your name.

computer.addUser('Sasser')

Share this post


Link to post
Share on other sites
  • 0

  • computer.users(): string, ...

    A list of all users registered on this computer, as a tuple. To iterate the result as a list, use table.pack on it, first.

    Please see the user rights documentation.

  • computer.addUser(name: string): boolean or nil, string

    Registers a new user with this computer. Returns true if the user was successfully added. Returns nil and an error message otherwise.

    The user must be currently in the game. The user will gain full access rights on the computer.

  • computer.removeUser(name: string): boolean

    Unregisters a user from this computer. Returns true if the user was removed, false if they weren't registered in the first place.

    The user will lose all access to this computer. When the last user is removed from the user list, the computer becomes accessible to all players.

so basically once you call addUser, it gives that person permission to use the computer

Share this post


Link to post
Share on other sites
  • 0

Ive read the wiki but i dont understand it fully, so if i would add my self to the computer it would be ...

 

computer.addUser(Sasser)

 

Is that correct?

Share this post


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...
Sign in to follow this  

×
×
  • Create New...

Important Information

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