Jump to content
Sign in to follow this  
Sega Dude

Making my first Atari game and I got a compile error...

Recommended Posts

Im making my first atari game with Visual bB. I was coding the position of the sprits and I got a compile error. It looks fine to me I don't know why it won't compile.Heres my code: (Scroll down for error)

 rem Generated 8/21/2010 9:59:27 AM by Visual bB Version 1.0.0.548
rem **********************************
rem *<filename>                      *
rem *<description>                   *
rem *<author>                        *
rem *<contact info>                  *
rem *<license>                       *
rem **********************************

playfield:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
................................
................................
................................
................................
................................
................................
................................
................................
................................
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end

COLUBK= $B6
COLUPF = 212
player0x=50:player0y=50
player1x=20:player1y=20
player0:
111000
%01111100
%01111100
010000
010000
111000
%01111100
%01111100
end

player1::
%01100110
%01101100
%01111101
110010
%01011101
%01001000
001000
111100
end


draw_loop
drawscreen
goto draw_loop

 

This is the error:

compileerror2.th.png

compileerror1.th.png

 

Thanks for your help!

Share this post


Link to post
Share on other sites

I don't know exactly what is going on thar but I noticed

 

 player1::

 

should probably be

 player1:

 

and the

 

playfield:

 

should have a space so it isn't a label

 

 playfield:

Share this post


Link to post
Share on other sites

It should look like this, though when you copy pasted your character its messed. This code will display both your characters at different positions. Your problem was placement of code and missing code. You could instead of using dim p1x and dim p1y just use the same as player0 but then they would be right on top of each other when you start the game. You always need to put spaces before most code for it to work.

 

x=50
y=50

dim p1x=100
dim p1y=100

main

playfield:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
................................
................................
................................
................................
................................
................................
................................
................................
................................
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end

COLUBK=$B6
COLUPF=212

player0x=50
player0y=50

player0:
%00111000
%01111100
%01111100
%00010000
%00010000
%00111000
%01111100
%01111100
end

player1x=p1x
player1y=p1y

player1:
%01100110
%01101100
%01111101
%00110010
%01011101
%01001000
%00001000
%00111100
end


drawscreen

goto main

Edited by endrien

Share this post


Link to post
Share on other sites

It should look like this, though when you copy pasted your character its messed. This code will display both your characters at different positions. Your problem was placement of code and missing code. You could instead of using dim p1x and dim p1y just use the same as player0 but then they would be right on top of each other when you start the game. You always need to put spaces before most code for it to work.

 

x=50
y=50

dim p1x=100
dim p1y=100

main

playfield:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
................................
................................
................................
................................
................................
................................
................................
................................
................................
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end

COLUBK=$B6
COLUPF=212

player0x=50
player0y=50

player0:
111000
%01111100
%01111100
010000
010000
111000
%01111100
%01111100
end

player1x=p1x
player1y=p1y

player1:
%01100110
%01101100
%01111101
110010
%01011101
%01001000
001000
111100
end


drawscreen

goto main

 

Thanks endrien! It works now!!

Share this post


Link to post
Share on other sites

 

 

 

Thanks endrien! It works now!!

No problem, any other questions I'm sure we've got an answer for. All you have to do is ask :).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...