many assorted syntax errors

This commit is contained in:
Kistaro Windrider 2023-12-20 13:04:13 -08:00
parent e50f516b11
commit 9ef762268f
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -691,7 +691,7 @@ spewy = frownie.new{
} }
mknew(spewy, function(ship) mknew(spewy, function(ship)
ship.main_gun=ship.main_gun or protron_gun.new{enemy=true} ship.main_gun=ship.main_gun or protron_gun.new{enemy=true}
end}) end)
chasey = ship_m.new{ chasey = ship_m.new{
sprite = 5, sprite = 5,
@ -872,7 +872,7 @@ function load_level(levelfile)
currentlevel[row[1]]=row currentlevel[row[1]]=row
end end
end end
assert found_eol assert(found_eol)
end end
function level_frame() function level_frame()
@ -889,7 +889,7 @@ function level_frame()
while cbs do while cbs do
assert(cbs[1] == distance) assert(cbs[1] == distance)
local f = _ENV[cbs[2]] local f = _ENV[cbs[2]]
assert(type(f) == "function", cbs[2].." at "..distance..." is not a function") assert(type(f) == "function", cbs[2].." at "..distance.." is not a function")
f(unpack(cbs, 3)) f(unpack(cbs, 3))
cbs=cbs.next cbs=cbs.next
end end
@ -914,7 +914,7 @@ function spawn_blocking_rnd_x(typ)
freeze -= self.ice freeze -= self.ice
self.ice = 0 self.ice = 0
self:orig_die() self:orig_die()
end end,
} }
eships:push_back(s) eships:push_back(s)
return s return s
@ -1020,14 +1020,14 @@ function spawn_rnd(typ, blocking, goodie,altspr)
freeze += blocking freeze += blocking
s = typ.new{ s = typ.new{
x = rnd(104), x = rnd(104),
y = -(typ.size * 8 - 1) y = -(typ.size * 8 - 1),
ice=blocking ice=blocking,
die=function(self) die=function(self)
freeze -= self.ice freeze -= self.ice
self.ice=0 self.ice=0
typ.die(self) typ.die(self)
spawn_goodie(goodie, self.x, self.y, self.size) spawn_goodie(goodie, self.x, self.y, self.size)
end end,
} }
if (altspr) s.spr = altspr if (altspr) s.spr = altspr
eships:push_back(s) eships:push_back(s)
@ -1043,7 +1043,7 @@ function spawn_goodie(goodie_name, x, y, sz)
end end
function multi(times, interval, fnm, ...) function multi(times, interval, fnm, ...)
local f,irm = _ENV[fnm],interval local f,irm,vargs = _ENV[fnm],interval,pack(...)
assert(type(f) == "function", fnm.." not a function") assert(type(f) == "function", fnm.." not a function")
fnm(...) fnm(...)
events:push_back{move=function() events:push_back{move=function()
@ -1051,7 +1051,7 @@ function multi(times, interval, fnm, ...)
if irm <= 0 then if irm <= 0 then
irm=interval irm=interval
times-=1 times-=1
fnm(...) fnm(unpack(vargs))
return times <= 1 return times <= 1
end end
end} end}