Lunatic: fix a couple of typo-like issues found by listglobals.sh. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@5026 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2015-02-22 19:31:11 +00:00
parent d508ff2694
commit 11f81070f2
4 changed files with 8 additions and 5 deletions

View file

@ -111,7 +111,7 @@ function bcheck.quote_idx(qnum, onlyidx)
return cstr
end
function bcheck.top_level(funcname)
function bcheck.top_level(funcname, errlev)
if (ffiC.g_elCallDepth > 0) then
error("Invalid use of "..funcname..": must be called from top level", errlev or 3)
end

View file

@ -21,6 +21,7 @@ local getmetatable = getmetatable
local ipairs = ipairs
local loadstring = loadstring
local pairs = pairs
local pcall = pcall
local rawget = rawget
local rawset = rawset
local select = select
@ -943,7 +944,7 @@ end
function actor_static_members.move(i, vec, cliptype, clipdist)
check_sprite_idx(i)
local vel = ivec3(vec.x, vec.y, vec.z)
return ffiC.A_MoveSpriteClipdist(spritenum, vel, cliptype, clipdist or -1)
return ffiC.A_MoveSpriteClipdist(i, vel, cliptype, clipdist or -1)
end
-- Delete sprite with index <i>.
@ -2049,7 +2050,7 @@ local function animate_all_sprites()
end
function check_arg_number(name, argpos, val)
local function check_arg_number(name, argpos, val)
if (type(val) ~= "number") then
errorf(3, "invalid '%s' argument (#%d) to gameactor: must be a number", name, argpos)
end

View file

@ -4,6 +4,8 @@
local ffi = require("ffi")
local ffiC = ffi.C
local assert = assert
local loadstring = loadstring
local pairs = pairs
local pcall = pcall
local print = print

View file

@ -1372,7 +1372,7 @@ function Cmd.xspriteflags(tilenum, flags, override)
end
-- Mark the last 'spriteflags' or 'sprite*' directive for the given actor.
g_code.aflagsloc[tilenum] = getLocation(format("'%s' for actor", g_lastkw), pos)
g_code.aflagsloc[tilenum] = getLocation(format("'%s' for actor", g_lastkw))
if (ffi and ok) then
local tile = ffiC.g_tile[tilenum]
@ -3892,7 +3892,7 @@ function parse(contents) -- local
end
end
function compare_gv(gva, gvb)
local function compare_gv(gva, gvb)
if (gva.loc[1] ~= gvb.loc[1]) then
return gva.loc[1] < gvb.loc[1]
end