Peter's first ScriptBasic program.
Report Card: DInclude "sbsw.inc"
SUB VARIABLES
z = 0
s = 0
tree = 0
star = 0
flow = 0
weed = 0
END SUB
tree = SW_LoadBmp("tree/mytree.bmp",1)
star = SW_LoadBmp("tree/starlight.bmp",3)
flow = SW_LoadBmp("tree/flower.bmp",8)
weed = SW_LoadBmp("tree/weed.bmp",1)
SW_Window 320,240,1
VARIABLES
While SW_Key(27)=0
SW_cls 0
SW_Sprite tree,0,0,0
SW_DrawBmp flow, 0, 111,128,128,z
SW_DrawBmp flow,191,118,128,128,z+4
SW_DrawBmp star,40,0,200,60,s
SW_DrawBmp weed,0,208,320,32,0
z +=1
if z=4 then z=0
s +=1
if s=3 then s=0
SW_Sync
SW_SetFps (8)
Wend
SW_Quit
C:\SB22\games\pg_tree>scriba tree.sb
tree.sb(12): error &H77:syntax error during checking the line and also noting that the syntax error so serious that none of t
he other syntax defintions can match the current line
tree.sb(13): error &H77:syntax error during checking the line and also noting that the syntax error so serious that none of t
he other syntax defintions can match the current line
tree.sb(14): error &H77:syntax error during checking the line and also noting that the syntax error so serious that none of t
he other syntax defintions can match the current line
tree.sb(15): error &H77:syntax error during checking the line and also noting that the syntax error so serious that none of t
he other syntax defintions can match the current line
C:\SB22\games\pg_tree>scriba tree.sb
The above problem was cause due to not using
x-func() syntax. The
() aren't required if no assignment is being made.
I would have thought you would have at least tried your first program before submitting it for review.
SourceForge Project of the MonthRunning on Ubuntu 64 native. (see attached)
X