This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
SgtElis's profile picture

Changing inputs(locals) in a program from another?

Started by SgtElis, 31 January 2013 - 10:24 PM
SgtElis #1
Posted 31 January 2013 - 11:24 PM
So I'm trying to make a simple log in system where I want to be able to change user name and password without having to edit the program it self! So if I could Print something in a program and it changed to local input in the other? I am a bit familiar with coding and local dossn't sound like it could be changed but if there was another way?

Bad english… :P/> (Sry)
ChunLing #2
Posted 31 January 2013 - 11:29 PM
You can use global variables, these will stay in the environment for all other programs run under the same instance of shell. But it would be more usual to save information (usually a serialized table) into a separate file so that the data will persist across chunk reloads. Check out the fs API.