Script Meta Information
planned
WolfGang Senizen
While I suspect allot of this is "to come" with the improved debugging features that have been "implied/promised" It would also be nice for scripts to be able to access some meta information about themselves.
This in part came up during discussion of the new event system (RFC) on possible issues with
os.clock()
and ll.GetTIme()
So I proposed a table with functions and or values for getting info about the script itself
e.g
type llscriptmeta = {
compile : {
time: number, -- Unix timestamp of script compile
by: uuid, -- Who saved the script
with: string -- Some version string of the compiler
},
startTime: number, -- Unix Timestamp of script start (resets with ll.ResetScript)
getUpTime: () -> number. -- Like ll.GetTime but with no luau caveats(resets with ll.ResetScript)
bytecodeSize: number, --- Size of the bytecode in bytes
...
}
Log In
H
Harold Linden
marked this post as
planned
We definitely want to implement better ability to get this sort of meta-information, but I'll need to think about an API. I think it makes sense to add to LSL as well, so we'll probably add some
ll.
functions for this. Only thing I don't think we could do is getUpTime()
since that would involve adding a new timer onto every script, and ll.ResetTime()
is discouraged in SLua for that reason.