Jump to content




How would I make a computer store info


  • You cannot reply to this topic
5 replies to this topic

#1 diamondpumpkin

  • Members
  • 59 posts
  • LocationPlaces, Ukraine

Posted 29 April 2015 - 06:32 PM

I'm trying to make a computer program that keep tracks of numbers for a money system. I'm not even sure where to start with it or how to store data like a few numbers. Little help?

#2 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 29 April 2015 - 07:36 PM

use fs api:

local file = fs.open(path,"w")
file.write(data)
file.close()

This simple it is.

If youre using tables, use this

data = textutils.serialize(myTable)

the table cannot contain functions or anything but strings nums and bools

#3 diamondpumpkin

  • Members
  • 59 posts
  • LocationPlaces, Ukraine

Posted 29 April 2015 - 07:50 PM

I am new at this I barely know what any of that means.

#4 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 29 April 2015 - 08:08 PM

fs.open ==> open file, save handler to var file

file.write ==> this info will be written to the file

file.close ==> CLOSES & saves file

#5 diamondpumpkin

  • Members
  • 59 posts
  • LocationPlaces, Ukraine

Posted 29 April 2015 - 08:20 PM

Okay, thanks! I made most of my system.

#6 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 29 April 2015 - 08:29 PM

You're welcome, and be sure to ask more questions if you need to





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users