I think that it may be best to post the whole code. I have solved it but im not sure how. It just seemed to fix itself after i messed about with some declarations within the function parameters.
function Game_1(Quickinteger AS FLOAT,X AS STRING,G AS FLOAT,G1 AS FLOAT)
temporyvariable = 0
clear entry buffer
repeat
repeat
cls
ink RGB(255, 255, 255), 1
center text 320, 200, "Please Enter The Name Of The User You Wish To Search for Game 1 Information"
center text 320, 250, entry$()
if scancode() = 14 then clear entry buffer
ink RGB(255, 255, 255), 1
box 290, 450, 350, 490
ink RGB(0, 0, 0), 1
center text 320, 460, "Main"
if mousey() > 150 and mousey() < 170 and mousex() > 240 and mousex() < 400 and mouseclick() = 1 then Main_Menu()
Username = entry$()
until returnkey() = 1
clear entry buffer
if file exist("Profiles\User Searches\" + Username + ".txt") = 1
open to read 1, ("Profiles\User Searches\" + Username + ".txt"): read string 1, A: close file 1
B = -1
C = 0
repeat
inc B, 1
if file exist("Profiles\" + Username + "\Game 1 " + str$(B) + ".txt") = 1 then C = 1
until C = 1
D = B
repeat
cls
ink RGB(0, 255, 255), 1
center text 245, 50, "A Graph To Show Game 1 Progress"
ink RGB(255, 255, 255), 1
box 0, 0, 640, 40
box 590, 450, 640, 590
box 0, 450, 589, 590
box 70, 70, 73, 400
box 70, 397, 420, 400
ink RGB(0, 255, 0), 1
text 45, 200, "S"
text 45, 220, "c"
text 45, 240, "o"
text 45, 260, "r"
text 45, 280, "e"
text 175, 430, "Attempt Number"
ink RGB(255, 0, 255), 1
Quickinteger = 0
for Z = 0 to 10
Quickinteger = Z
X = left$ ( str$(D / 10 * Quickinteger), 3)
center text (70 + Quickinteger * 35), 400, X
next Z
Z = 0
for Z = 1 to D REM G is percentage
Quickinteger = Z
open to read 1, "Profiles\" + Username + "\Game 1\Game " + str$(Z) + ".txt"
for temporyvariable = 0 to 64 step 1
read string 1, quickstring$
next temporyvariable
temporyvariable = 0
read string 1, timea$
read string 1, attempta$
for temporyvariable = 0 to 3 step 1
read string 1, quickstring$
next temporyvariable
temporyvariable = 0
read string 1, timeb$
read string 1, attemptb$
for temporyvariable = 0 to 3 step 1
read string 1, quickstring$
next temporyvariable
temporyvariable = 0
read string 1, timec$
read string 1, attemptc$
for temporyvariable = 0 to 3 step 1
read string 1, quickstring$
next temporyvariable
temporyvariable = 0
read string 1, timed$
read string 1, attemptd$
for temporyvariable = 0 to 3 step 1
read string 1, quickstring$
next temporyvariable
temporyvariable = 0
read string 1, timee$
read string 1, attempte$
for temporyvariable = 0 to 3 step 1
read string 1, quickstring$
next temporyvariable
temporyvariable = 0
read string 1, timef$
read string 1, attemptf$
for temporyvariable = 0 to 3 step 1
read string 1, quickstring$
next temporyvariable
temporyvariable = 0
read string 1, timeg$
read string 1, attemptg$
close file 1
G = ( val(timea$) + val(timeb$) + val(timec$) + val(timed$) + val(timee$) + val(timef$) + val(timeg$) ) / 7
if G > 327 then G = 327
if G1 = 0 or Quickinteger1 = 0: else
line (350 / D * Quickinteger1 + 70), (420 - G1), (350 / D * Quickinteger + 70), (420 - G)
position mouse (Quickinteger * 35 + 73), G
endif
if Z < D
G1 = G
Quickinteger1 = Quickinteger
endif
next Z
line (Quickinteger1 * 35 + 73), G1, (Quickinteger * 35 + 73), G
ink RGB(255, 0, 0), 1
text 10, 100, "P": text 620, 100, "P"
text 10, 120, "": text 620, 120, ""
text 10, 140, "|": text 620, 140, "|"
text 10, 160, "": text 620, 160, ""
text 10, 180, "P": text 620, 180, "P"
text 10, 200, "r": text 620, 200, "r"
text 10, 220, "i": text 620, 220, "i"
text 10, 240, "n": text 620, 240, "n"
text 10, 260, "t": text 620, 260, "t"
text 10, 280, "": text 620, 280, ""
text 10, 300, "|": text 620, 300, "|"
text 10, 320, "": text 620, 320, ""
text 10, 340, "P": text 620, 340, "P"
ink RGB(0, 0, 0), 1
center text 320, 10, "Users"
center text 615, 455, "Back"
center text 295, 455, "Main Menu"
if mousex() > 590 and mousex() < 640 and mousey() > 450 and mousey() < 590 and mouseclick() = 1 then Main_Menu()
if mousex() > 250 and mousex() < 390 and mousey() > 165 and mousey() < 185 and mouseclick() = 1 then Game_1_User_Data()
if mousex() > 250 and mousex() < 390 and mousey() > 245 and mousey() < 265 and mouseclick() = 1 then Game_2_User_Data()
if mousex() > 220 and mousex() < 420 and mousey() > 325 and mousey() < 345 and mouseclick() = 1 then Settings_User_Data()
until temporyvariable = 1
else
ink RGB(255, 255, 255), 1
cls
center text 320, 200, "User Does Not Exist"
print Username
wait 1000
endif
until temporyvariable = 1
temporyvariable = 0
endfunction
This is my Game 1 graph drawing function and will have a line drawn, print out option and bookmark option put in once i get the hard stuff working. And then i will be repeating it for my second game.