Author Topic: SW QB compatibility  (Read 5948 times)

0 Members and 1 Guest are viewing this topic.

JRS

  • Guest
Re: SW QB compatibility
« Reply #15 on: April 15, 2013, 11:24:02 AM »
Quote
Yes, that was it.

Is for ScriptBasic.

Peter's first SB program and he forgot to post a picture of his new kid. (must be all the excitement)

Thanks Peter!

Peter

  • Guest
Re: SW QB compatibility
« Reply #16 on: April 15, 2013, 11:43:38 AM »
Hi,

Did you know that OxygenBasic knows LUA syntax.
Try this!

Code: [Select]
include "sw.inc"
Window 640,480,1

sys i
For y=0, 480, 30
    For x=0, 600, 40
        FillBox(x,y,40,30, RGB(i,i,i))
        i +=1
    Next
Next

WaitKey
Quit

JRS

  • Guest
Re: SW QB compatibility
« Reply #17 on: April 15, 2013, 12:33:48 PM »
Peter's first ScriptBasic program.

Report Card:  D



Code: [Select]
Include "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 Month

Running on Ubuntu 64 native. (see attached)


X
« Last Edit: April 15, 2013, 07:26:58 PM by JRS »

Peter

  • Guest
Re: SW QB compatibility
« Reply #18 on: April 15, 2013, 02:03:10 PM »
Looks good.  :D

I think like OxygenBasic, ever simple.

I can't test. I have always a crash. It was just an idea, but a bad idea.
No time for learning about well placed brackets.

JRS

  • Guest
Re: SW QB compatibility
« Reply #19 on: April 15, 2013, 02:47:33 PM »
Can you make it work in O2 so I can see what the problem is with the SB version?

Quote
I can't test. I have always a crash.

You said you had the SokoMouse game running in SB, what happen to now start causing crashes? SB has to be one of the easiest languages around to install and program with. I just don't understand the issues or lack of interest. If you are unable to get SB running by unzipping and pointing the system path to the SB bin directory, I'm astonished that you were able to create such a cool library like Simple Window.

« Last Edit: April 15, 2013, 07:18:57 PM by JRS »

Peter

  • Guest
Re: SW QB compatibility
« Reply #20 on: April 16, 2013, 01:48:18 AM »
Quote
I'm astonished that you were able to create such a cool library like Simple Window.

Sometimes, I have little bit luck !

There isn't room for programming with ScriptBasic between all the other programming languages at the moment.
My favorites are Assembler C/C++/OxygenBasic/ThinBasic.

Other works are Music/ Drawing/ Natural science/ Sleeping/ Eating/ Reading/ Playing.
There are some things more,  but I can't remember at the moment.

I have only two hands for all this simple things, do you have more?

Aurel

  • Guest
Re: SW QB compatibility
« Reply #21 on: April 16, 2013, 02:44:34 AM »
Quote
SB has to be one of the easiest languages around to install and program with

Unfortunately John is not ...
syntax is nice and clean and represent very well basic as BASIC
but as you say many many times SB is created for scipting and embeding ,right?
I know how much trouble i have to start and run some examples in SB on windows.
But this can be also my lack of knowlege to... :-\

JRS

  • Guest
Re: SW QB compatibility
« Reply #22 on: April 16, 2013, 07:55:43 AM »
This is the OxygenBasic forum not the ScriptBasic Forum.

The Simple Window examples were written for O2 not SB.

There are more important things in life than playing games.

Thanks for everyones time.