- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
CapitalHitman38
-
Content Count
2 -
Joined
-
Last visited
Posts posted by CapitalHitman38
-
-
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.
check available space
in Programming
Posted
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...)