I've just made a very simple map (only two asteroids) as a practice for making better stuff, and the attached message comes up. Any help?
If it's of any use, here's the code.
function LevelSetup()
-- Asteroid 0
a = AddAsteroidWithAttribs(0,0,1,1,1)
a.Owner = 1
a.TreeCap = 2
a:SetRadius(50)
a.AddSeedlings(50)
s = AddDysonTree()
s:LevelUp
-- Asteroid 1
a = AddAsteroidWithAttribs(400,0,1,1,1)
a.Owner = 0
a.TreeCap = 5
a:SetRadius(50)
end
function LevelLogic()
gamewon = 0
roidnumber = 2
while GameRunning() do
if GetEmpire(1):GetNumOwnedAsteroids() == 0 then
gamewon = 1
elseif GetEmpire(1):GetNumOwnedAsteroids() == roidnumber then
gamewon = 2
end
coroutine.yield()
end
while gamewon == 0 do
coroutine.yield()
end
if gamewon == 1 then
Pause()
WaitDialog()
MessageBox('You have won.')
Unpause()
Quit(true)
end
if gamewon == 2 then
Pause()
MessageBox('You have lost.')
Unpause()
Quit(false)
end
end