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

Fictitious Rotor

Members
  • Content Count

    15
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Upvote
    Fictitious Rotor got a reaction from Molinko in How could I get the current used RAM of the computer?   
    So a few quick things.
    First, when you get a problem, please send us a screenshot and logs if possible to make it easier for us to identify your problem.
    Second, when you're looking at an API in the documentation, be sure to look at the examples that they give as they contain lots of hints!
    For example, the first snippit.lua in the computer api shows why your program doesn't work.
    I'll demonstrate a working solution here.

    Before you can call any methods, you have to assign the computer API to a variable.
    What they usually do in the documentation is to call the variable 'computer' like so:
    local computer = require("computer") print(computer.totalMemory()) Because you didn't set the api to a variable first, your program tried to call a variable that doesn't exist and gave up.
    Should be an easy problem to fix
×
×
  • Create New...

Important Information

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