Masternama-8000 / Star16-Palette

Star16 Palette for TIC-80
MIT License
1 stars 0 forks source link

Loading Error: Out of state #1

Open Masternama-8000 opened 5 years ago

Masternama-8000 commented 5 years ago

This version 0.10.0

Star16 Palette picture art (Page 1)

Press left button to Previous page. After says "Loading Error: Out of state".

Code


-- Error
if state==-1 then
trace("Loading Error: Out of state",6)
exit()end
Masternama-8000 commented 5 years ago

screen

Removed error message version is 1.1.

Masternama-8000 commented 5 years ago

Version 1.1

Code

-- title:  Star16 palette - Picture art
-- author: masternama
-- desc:   I have a 5 pictures. Press left <- or Right -> to next page.
-- ver:    1.1
-- pal:    STAR16
-- banks:  5
-- source code: https://github.com/Masternama-8000/Star16-Palette
-- script: lua

state=0 -- Load state
t=0

function picture()
-- Error
if state==-1 then
state=0 end

if state==0 then
sync(0,0)
-- Star16 Computer
map()
print("Copyright 2019 Master nama",53,52,15,nil,1,1)
print("0.6.0",130,43,15,nil,1,1)
print("Copyright",53,52,15,nil,1,1)
print("https://masterchannel8000com.weebly",50,60,15,nil,1,1)
print(".com",50,66,15,nil,1,1)
print("Hello!. Type help for help",50,74,8,nil,1,1)
print(">",50,86,15,nil,1,1)
spr(256+t%60//30*2,52,83,0,1,0,0,1,1)
t=t+0.64
print("Star16 Computer -  Page 1",1,1)
print("Press left <- or Right -> to next page",1,8)end

if state==1 then
-- Nice a world!
sync(0,1)
map()
print("Nice a world! -  Page 2",1,1)
print("Press left <- or Right -> to next page",1,8)end

if state==2 then
-- The space
sync(0,2)
map()
print("The space -  Page 3",1,1)
print("Press left <- or Right -> to next page",1,8)end

if state==3 then
-- Sky
sync(0,3)
map()
print("Sky -  Page 4",1,1)
print("Press left <- or Right -> to next page",1,8)end

if state==4 then
-- Retro video game
sync(0,4)
map()
print("Score: 152                                    Lives: 3",1,20)
print("Retro video game -  Page 5",1,1)
print("Press left <- or Right -> to next page",1,8)end

if state==5 then
state=4 end
end

function TIC()
picture()

-- Buttons
if btnp(2) then state=state-1 end
if btnp(3) then state=state+1 end
end