revonneer i found you problem. right here:
Quote: "Num:
sync on: Do
cls
Print "What score do you want to go to!"
Input num
Goto New_Game
sync:loop
"
Take out the
and the
of your code right there.
that spot should look like this:
Num:
cls
Print "What score do you want to go to!"
Input num
Goto New_Game
here is the full source of your game:
Do
if button(290,200,"Start")=1 then Goto Start
loop
Start:
sync on:Do
cls
if Button(20,55,"New Game")=1 then Goto Num
If Button(20,95,"Exit")=1 then End
sync:loop
Num:
cls
Print "What score do you want to go to!"
Input "",num
Goto New_Game
New_Game:
rem HIDE THE MOUSE AND LIMIT THE SYNC RATE TO 40
sync rate 40
rem MAKE THE PADDLES, BALL AND FLOOR
make object box 1,1,1,3:color object 1,rgb(255,0,0)
make object box 2,1,1,3:color object 2,rgb(0,255,0)
make object sphere 3,1:color object 3,rgb(0,0,50)
make object box 4,10,0.1,10:position object 4,0,-0.55,0:color object 4,rgb(255,114,0)
rem SET THE BALL ANGLE TO 90 DEGREES
balla#=90
rem START THE MAIN LOOP
sync on:Do
rem SCORING
if ballx#>6 then player2score#=player2score#+1:ballx#=0:ballz#=0:balla#=270
if ballx#<-6 then player1score#=player1score#+1:ballx#=0:ballz#=0:balla#=90
set cursor 300,50:print player2score#
set cursor 320,50:print "-"
set cursor 340,50:print player1score#
rem BALL MOVEMENT
ballx#=newxvalue(ballx#,balla#,0.3):ballz#=newzvalue(ballz#,balla#,0.3)
rem PLAYER 1 PADDLE MOVEMENT
IF upkey()=1 and player1pos#<3.5 then player1pos#=player1pos#+0.5
IF downkey()=1 and player1pos#>-3.5 then player1pos#=player1pos#-0.5
if upkey()=1 and ballx#>4 and ballx#<4.5 then balla#=balla#+8
if downkey()=1 and ballx#>4 and ballx#<4.5 then balla#=balla#-8
rem PLAYER 2 PADDLE MOVEMENT
IF keystate(17)=1 and player2pos#<3.5 then player2pos#=player2pos#+0.5
IF keystate(31)=1 and player2pos#>-3.5 then player2pos#=player2pos#-0.5
if keystate(17)=1 and ballx#<-4 and ballx#>-4.5 then balla#=balla#+8
if keystate(31)=1 and ballx#<-4 and ballx#>-4.5 then balla#=balla#-8
rem BOUNCING
if ballx#>4 and ballx#<4.5 and ABS(player1pos#-ballz#)<1.5 then balla#=360-balla#
if ballx#<-4 and ballx#>-4.5 and ABS(player2pos#-ballz#)<1.5 then balla#=360-balla#
if ballz#>4 or ballz#<-4 then balla#=180-balla#
rem MAKE SURE balla# IS LESS THAN 360 AND MORE THAN 0
balla#=wrapvalue(balla#)
rem POSITION OBJECTS
position object 1,5,0,player1pos#:position object 2,-5,0,player2pos#
position object 3,ballx#,0,ballz#:yrotate object 3,balla#
position camera 0,10,-10:point camera 0,0,0
if player1score#>=num then print "Player 1 Wins":show mouse:if button(300,250,"EXIT")=1 then end
if player2score#>=num then print "Player 2 Wins":show mouse:if button(300,250,"EXIT")=1 then end
if Button(20,55,"INSTRUCTIONS")=1 then Goto Instructions
sync:loop
Instructions:
sync rate 100
sync on:Do
cls
show mouse
print "INSTRUCTIONS"
print "Player 1 uses the up and down key on the directional pad."
print "Player 2 uses the w and s key as up and down key."
if Button(20,95,"Exit")=1 then end
sync:loop
function Button(x1,y1,WORDS$)
Pressed=0
x2=Text Width(WORDS$)
y2=Text Height(WORDS$)
if mousex()>x1 and mousex()<x1+x2
if mousey()>y1-y2 and mousey()<y1+y2
Pressed=1
endif
endif
if pressed=1 then ink rgb(0,30,255),0 else ink rgb(255,255,255),0
if pressed=1
Pressed=Mouseclick()
else
pressed = 0
endif
text x1,y1,WORDS$
endfunction pressed
good luck,
-=Snowfall Studios=
O
what goes up. must come down.