STGraves Posted February 28, 2015 Share Posted February 28, 2015 Hello I have found another problem in my code, this time I'm not going to upload the code but a screenshot, I don't understand the problem, can anyone help me?, as you can see on the pic it has a compiling error. Thanks. You know what? here is the code. set kernel_options pfcolors no_blank_lines player1colors rem ********************************** rem *<E.T.'S Revenge>* rem *<Stop E.T. from conquering the world.>* rem *<agpkkck@gmail.com>* rem *<www.stgravesof.zz.vc>* rem ********************************** rem create reset thing reset pfclear goto opening end rem Create the title screen opening playfield: .......XXX..XXX.X..XX........... .......X.....X..X.X..X.......... .......XX....X.....X............ .......X.....X...X..X........... .......XXX.X.X.X..XX............ ................................ XXX..XXX.X.X.XXX.X..X..XXX.XXX.. X..X.X...X.X.X...XX.X.X....X.... X..X.XX..X.X.XX..X.XX.X.XX.XX... XXX..X...X.X.X...X..X.X..X.X.... X..X.XXX..X..XXX.X..X..XXX.XXX.. end player1x=0:player1y=0 player0x=0:player0y=0 rem Loop the screen until the fire button is pressed title COLUBK = $90 pfcolors: $32 $32 $32 $32 $32 $32 $32 $32 $32 $32 $32 $32 $32 $32 end drawscreen if joy0fire || joy1fire then goto skiptitle score = 2015 : scorecolor = $AE goto title rem This function displays after the title is skipped skiptitle rem Player location player1x = 70 : player1y = 90 player0x = 50 : player0y = 20 rem Score setting and color score = 0 : scorecolor = $1E rem Missle size and location ballheight=1:bally=150 rem Create a variable to keep up with lives a = 3 rem create lives lives: %01000100 %11111110 %11111110 %01111100 %00111000 %00010000 %00010000 %00010000 end rem Create the playfield playfield: XXXXXXXXX.........XXXXXXXX...... XXXXXXXXX.........XXXXXXXX...... XXXXXXXXX.........XXXXXXXX...... XXXXXXXXX.........XXXXXXXX...... XXXXXXXXX.........XXXXXXXX...... .........XXXXXXXXX........XXXXXX .........XXXXXXXXX........XXXXXX .........XXXXXXXXX........XXXXXX .........XXXXXXXXX........XXXXXX .........XXXXXXXXX........XXXXXX .........XXXXXXXXX........XXXXXX end rem This main function is what loops constantly main COLUBK = $8A pfcolors: $04 $06 $08 $0A $0C $0A $08 $06 $04 $02 $00 end if joy0up || joy1up then pfscroll down if joy0down || joy1down then pfscroll up if joy0right || joy1down then pfscroll left if joy0left || joy1left then pfscroll right rem This is the animation function animate rem This frame variable slows down the animation v = v + 1 rem This code animates the sprites if v = 7 && w = 0 then ax if v = 7 && w = 1 then bx if v = 7 && w = 2 then cx if v = 7 && w = 3 then dx goto nextstep rem These four sprites are different stages of the animation ax v = 0 w = 1 player0: %01110000 %00110111 %00011111 %10011111 %11111111 %00011111 %00001111 %00000011 %11000011 %11111111 %10011111 %11111100 end goto nextstep bx v = 0 w = 2 player0: %01110000 %00110111 %00011111 %10011111 %11111111 %00011111 %00001111 %00000011 %00000011 %00000011 %11000011 %11111111 %10011111 %11111100 end goto nextstep cx v = 0 w = 3 player0: %00000111 %01110011 %00011111 %10011111 %11111111 %00011111 %00001111 %00000011 %00000011 %00000011 %00000011 %00000011 %11000011 %11111111 %10011111 %11111100 end goto nextstep dx v = 0 w = 0 player0: %00000111 %01110011 %00011111 %10011111 %11111111 %00011111 %00001111 %00000011 %00000011 %00000011 %11000011 %11111111 %10011111 %11111100 end goto nextstep rem Create acorn sprite nextstep player1color: $06 $00 $00 $00 $00 $00 $0C $00 $00 $00 $00 $00 $0A $0A $0A $0A $0A $0A $0A $0A end player1: %01100110 %00100100 %00100100 %00100100 %00111100 %00111100 %10000001 %10111101 %10111101 %10111101 %10100101 %01100110 %00011000 %00100100 %01111110 %10000001 %10000001 %01111110 %00111100 %00011000 end rem check to see if a missile has already been fired checkfire if bally>100 then goto skip bally = bally - 2 : goto draw rem if a missile hasn't been fired, then fire missile skip if joy0fire || joy1fire then bally=player1y-2:ballx=player1x+4 rem Draw output to screen draw drawscreen rem Fix player wraparound bug if player1x < 8 then player1x = 8 if player1x > 150 then player1x = 150 if player1y < 8 then player1y = 8 if player1y > 84 then player1y = 84 rem Have player 1 chase player 2 if player0y < player1y then player0y = player0y + 1 if player0y > player1y then player0y = player0y - 1 if player0x < player1x then player0x = player0x + 1 if player0x > player1x then player0x = player0x - 1 player0x = player0x : player0y = player0y rem Detect missile collision with squirrel if collision(ball,player0) then score=score+1:player0x=rand/2:player0y=0:bally=255:goto pointsound rem Detect squirrel collision with the acorn if collision(player1,player0) then score=score-1:player0x=rand/2:player0y=0:bally=255:a=a-1:goto deadsound rem joystick movements if joy0up || joy1up then player1y = player1y-1 : goto skipmove if joy0down || joy1down then player1y = player1y+1 : goto skipmove if joy0left || joy1left then player1x = player1x-1 : goto skipmove if joy0right || joy1right then player1x = player1x+1 : goto skipmove rem refresh the screen skipmove goto main rem Play point sound pointsound AUDV0 = 8 : AUDC0 = 12 : AUDF0 = 10 p = p + 1 drawscreen if p < 2 then pointsound p = 0 AUDV0 = 0 : AUDC0 = 0 : AUDF0 = 0 goto main rem Play dead sound deadsound AUDV1 = 8 AUDC1 = 7 AUDF1 = 13 p = p + 1 drawscreen if p < 5 then deadsound p = 0 AUDV1 = 0 : AUDC1 = 0 : AUDF1 = 0 if a = 0 then goto restartpf goto main end rem create reset thing 2 restartpf pfclear goto deadscreen end rem Create the dead screen deadscreen playfield: XXX..XXX.....XX...XX..XX.XX.XXX. X.....X.....X..X.X..X.X.X.X.X... XX....X.....X....XXXX.X...X.XX.. X.....X.....X..X.X..X.X...X.X... XXX.X.X.X....XX..X..X.X...X.XXX. ................................ XXX...XX...XX..X..X..X.X.X...... X..X.X..X.X..X.X.X...X.X.X...... XXX..XXXX.X....XX....X.X.X...... X..X.X..X.X..X.X.X.............. XXX..X..X..XX..X..X..X.X.X...... end player1x=0:player1y=0 player0x=0:player0y=0 rem Loop the screen until the switch is activated dead COLUBK = $C2 pfcolors: $34 $34 $34 $34 $34 $34 $34 $34 $34 $34 $34 $34 end score = 2015 : scorecolor = $AE playfieldpos = 8 drawscreen if switchreset then goto reset drawscreen goto dead Quote Link to comment Share on other sites More sharing options...
STGraves Posted February 28, 2015 Author Share Posted February 28, 2015 I've realized that the problem is inside the color code, but I don't know why. Quote Link to comment Share on other sites More sharing options...
Mountain King Posted February 28, 2015 Share Posted February 28, 2015 you need to indent "player1color:" nextstep player1color: $06 $00 $00 $00 $00 $00 $0C $00 $00 $00 $00 $00 $0A $0A $0A $0A $0A $0A $0A $0A end Quote Link to comment Share on other sites More sharing options...
STGraves Posted February 28, 2015 Author Share Posted February 28, 2015 Thanks I'll give it a shot. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted February 28, 2015 Share Posted February 28, 2015 If you click on the Messages button, it will tell you what is wrong. But that's not all that is wrong with the code. You also had extra ends and were using drawscreen as a label. I fixed those things: ets_revenge_2015y_02m_28d_1304t.bin ets_revenge_2015y_02m_28d_1304t.bas You might also want to check out this program: atariage.com/forums/topic/235427-tinkernut-world-deluxe-example-program/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.