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

CapitalHitman38

Members
  • Content Count

    2
  • Joined

  • Last visited

Posts posted by CapitalHitman38

  1. Oh, I see what you did. You copied from the documentation. Generally in documentation it's standard to put the type of variable that a function returns after a colon. All you need is the part before :number. That part just tells you that that method returns a number.

    So i dont need to put in ":number" because that is just telling me what type of variable its going to output?

     

    I did that and now it says

     

    /usedspace:1: attempt to call a nil value (global 'spaceUsed')

    stack traceback:

                 /usedspace:1: in main chunk

                  (...tailcalls...)

  2. Hey all, i'm a huge newbie at this and all of my lua programming  knowledge is from computercraft, and very little knowledge at that. I am messing around with OC and am trying to make a program that displays the used space of the hard drive(s) that the computer(server in this case) is connected to for learning purposes, what i typed was.

     

    space = spaceUsed():number

    print ("Your used space in bytes is:", space)

     

    and it gives me

     

    /usedspace:2: function argument expected near 'print'

     

    when i try to run it. Im not sure if what im doing wrong, or even if that is valid lua.

×
×
  • Create New...

Important Information

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