Hmm, where did you find this helloworld.lua file? Was it a copy of the script on
this page? That was meant to be run as a system.lua script. system.lua being the script that is run first when Verge starts, from which all other non-map scripts start.
Anyway, it's very likely you're getting this error because you haven't modified your system.lua,
or helloworld.lua is defining an
autoexec and so is system.lua, but helloworld.lua is
require'd before system.lua defines
autoexec.
Anyway, in Lua, it is not an error to "redefine" an existing function, because this
function autoexec()
-- ...
end
is just syntax sugar for this
autoexec = function()
-- ...
end
where autoexec is a variable holding the function value.
Hope that helps.
EDIT: modified the vx hello world page to tell people to save it as system.lua.