newTerm = {}
for k,v in pairs(term) do
newTerm[k] = function(...) return v(...) end
end
oldTerm = _G.term
_G.term = newTerm
print("The quick brown fox jumped over the lazy dog")
_G.term = oldTerm
This works fine. As soon as I try to replace one of the functions with a non-standard wrapped version, the system crashes to reboot.
newTerm = {}
for k,v in pairs(term) do
newTerm[k] = function(...) return v(...) end
end
newTerm.write = function(...)
args = {...}
for i = 1,#args do
if type(args[i]) == "string" then
args[i] = args[i]:upper()
end
end
return term.write(unpack(args))
end
oldTerm = _G.term
_G.term = newTerm
print("The quick brown fox jumped over the lazy dog")
_G.term = oldTerm
This should simply allow normal activity on the screen, but printing everything in caps. Obviously this is just a proof of concept, but it should work. Any ideas?












