`loadfile` in Lua
A loadfile
implementation for SRB2.
Lua scripters:
-
loadfile
exists now, and it's basicallydofile
, but instead of calling the file immediately, the file is returned as a function for you to do stuff with, like sending it arguments and doingsetfenv
shenanigans.
C people:
-
LUA_DoLump
replaces the oldLUA_LoadLump
;LUA_LoadLump
doesloadfile
stuff now. -
LUA_DoLump
(and by extensiondofile
) is now implemented internally as the equivalent ofloadfile("filename.lua")()
Here's a cool PK3 that self-tests itself. It will check for basically every case I've thought of so far.
loadfile.pk3
Edited by Golden
Merge request reports
Activity
added 1 commit
- 6f19615f - Remove unused variable to fix warning in luaB_loadfile.
added 2217 commits
-
6f19615f...a68440c4 - 2216 commits from branch
STJr:next
- 5693dcad - Merge branch SRB2:next into loadfile
-
6f19615f...a68440c4 - 2216 commits from branch
enabled an automatic merge when the pipeline for b3ef2b33 succeeds
mentioned in commit c2a8d1f7
added Wiki to-do label
Please register or sign in to reply