453 posts
Location
Holland
Posted 01 January 2013 - 07:37 AM
can i make files read only with a function? yes: what function?
can i protect values and variables to be protected so that they are "read only"? yes: what function?
264 posts
Location
Where you aren't
Posted 01 January 2013 - 08:26 AM
1. You can remake the fs API to check if a file is protected
2. No clue. I'm not sure if Lua has constants.
1054 posts
Posted 01 January 2013 - 08:41 AM
1. As mentioned by zekesonxx .
2. Lua has no constants but that doesn't matter. You should read up on environments and metatables. You could alter the way the environment table indexes. But still, to make it perfectly secure would be terribly elaborate and you'd have to deep copy each value, otherwise they could use the returned references for altering the values I guess.