Dark Bit Factory & Gravity

ARCHIVE => Archive => Useful links => Topic started by: mike_g on January 03, 2007

Title: Cobra Demo Released
Post by: mike_g on January 03, 2007
Just incase any of you guys dident know, demo for the Cobra programming language is available.

I am having a poke about with it at the moment and thought I'd mention it. Link Here (http://www.squeakyduck.co.uk/forum/) O0
Title: Re: Cobra Demo Released
Post by: Shockwave on January 03, 2007
Cheers Mike :) Please let us know how you get on with it. A Cobra section for the board is a possibility if there are enough people here using it.
Title: Re: Cobra Demo Released
Post by: Clyde on January 03, 2007
I have been dabbling with it. But am getting division by zero errors. :'(

Thanks and cheers Mike_G for the news of the demo.
Title: Re: Cobra Demo Released
Post by: mike_g on January 03, 2007
To be honest I havent got much further than "Hello World" myself. I like the IDE and some of the samples but so far I havent found the language too intuative. I probably just need to get used to it a bit first. I was going to have a go at making a simple game for a compo but that sites gone down for the moment :(

Title: Re: Cobra Demo Released
Post by: Ghost^BHT on January 03, 2007
Quote
I have been dabbling with it. But am getting division by zero errors. Cry

Thanks and cheers Mike_G for the news of the demo.

Then don't divide by 0  :inspired:

Kidding :) show us an example Clyde.

Title: Re: Cobra Demo Released
Post by: Shockwave on January 03, 2007
I can help with that ;) You get a divide by zero error when you try to divide an integer by 0.

Better?
Title: Re: Cobra Demo Released
Post by: Clyde on January 03, 2007
@Wham: There's a little something in the General Code + Techniques bruv.
@Shock: Cheers.

What is slightly lacking is content in the help ( maybe this is as it's a demo version ), as I'm unfamilar with alot of the commands.

None the less, Top trumps for releasing a demo version.
 8)
Title: Re: Cobra Demo Released
Post by: Ghost^BHT on January 03, 2007
@Clyde : In your cobra star prog 

the StarX[a] = Rand(-30000,30000) will at some point evaluate to 0  and  TX=( StarX[ a ] / StarZ[ a ])+( XRES2 ) will therefore be divided by zero at some point .I think that's where your problem is
Title: Re: Cobra Demo Released
Post by: Stonemonkey on January 03, 2007
I think it's the division by StarZ[a] , make it reset the values if StarZ[a]<=0 as well as the points going offscreen.

EDIT: <=0
Title: Re: Cobra Demo Released
Post by: Clyde on January 03, 2007
Thanks all. :)
As a make shift fix, I used this in the code:

Code: [Select]
If Starz[ a ]>1 Then   
     
            TX=( StarX[ a ] / StarZ[ a ])+( XRES2 )
            TY=( StarY[ a ] / StarZ[ a ])+( YRES2 )
         
EndIf