When I try to run this I get a run time error. Can someone tell me how to get rid of the error? This is due Sunday by midnight so the sooner I get help the better.

Thanks,

Ananda (Uh-non-duh)


'Ananda Bennett '10/26/2007 GOTO [getInput] GOTO [assignRiskCode] GOTO [determineRisk] GOTO [printOutput] [getInput] print "What is your name?" read name$ print "How old are you?" read age if age <= 16 then print "Invalid entry" end if print "How many traffic violatlons do you have?" read viols if viols < 0 then print "Invalid entry" end if [determineRiskCode] if viols >= 4 then let riskcode = 1 end if if viols = 3 then let riskcode = 2 end if if viols = 2 then let riskcode = 2 end if if viols = 1 then let riskcode = 3 end if if viols = 0 then let riskcode = 4 end if [assignRiskLevel] if riskcode = 1 then let risklevel$ = "High" end if if riskcode = 2 then let risklevel$ = "Moderate" end if if riskcode = 3 then let risklevel$ = "Low" else let risklevel$ = "No" End If [printOutput] if age < 25 then if viols >= 4 then print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $480.00." end if end if if age > 25 then if viols >= 4 then print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $410.00." end if end if if age < 25 then if viols = 3 then print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $450.00." end if end if if age > 25 then if viols = 3 then print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $390.00." end if end if if age < 25 then if viols = 2 then print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $405.00." end if end if if age > 25 then if viols = 2 then print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $365.00." end if end if if age < 25 then if viols = 1 then print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $380.00." end if end if if age > 25 then if viols = 1 then print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $315.00." end if end if if age < 25 then if viols = 0 then print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $325.00." end if end if if age > 25 then if viols = 0 then print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $275.00." end if end if stop [/code=syntax][code=syntax] 'Ananda Bennett
'10/26/2007
GOTO [getInput]
GOTO [assignRiskCode]
GOTO [determineRisk]
GOTO [printOutput]
[getInput]
print "What is your name?"
read name$
print "How old are you?"
read age
if age <= 16 then
print "Invalid entry"
end if
print "How many traffic violatlons do you have?"
read viols
if viols < 0 then
print "Invalid entry"
end if
[determineRiskCode]
if viols >= 4 then
let riskcode = 1
end if
if viols = 3 then
let riskcode = 2
end if
if viols = 2 then
let riskcode = 2
end if
if viols = 1 then
let riskcode = 3
end if
if viols = 0 then
let riskcode = 4
end if
[assignRiskLevel]
if riskcode = 1 then
let risklevel$ = "High"
end if
if riskcode = 2 then
let risklevel$ = "Moderate"
end if
if riskcode = 3 then
let risklevel$ = "Low"
else
let risklevel$ = "No"
End If
[printOutput]
if age < 25 then
if viols >= 4 then
print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $480.00."
end if
end if
if age > 25 then
if viols >= 4 then
print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $410.00."
end if
end if
if age < 25 then
if viols = 3 then
print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $450.00."
end if
end if
if age > 25 then
if viols = 3 then
print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $390.00."
end if
end if
if age < 25 then
if viols = 2 then
print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $405.00."
end if
end if
if age > 25 then
if viols = 2 then
print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $365.00."
end if
end if
if age < 25 then
if viols = 1 then
print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $380.00."
end if
end if
if age > 25 then
if viols = 1 then
print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $315.00."
end if
end if
if age < 25 then
if viols = 0 then
print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $325.00."
end if
end if
if age > 25 then
if viols = 0 then
print name$ ; ", as a " ;risklevel$ ; "risk driver, your insurance will cost $275.00."
end if
end if
stop
[/code=syntax]

This is just a wild guess (I've never tried Liberty Basic) but I noticed that some of the code in the square brackets is different. In other words...

GOTO [assignRiskCode]
GOTO [determineRisk]
...
[determineRiskCode]
[assignRiskLevel]

Maybe this is causing the problem? Are there any other details you can provide regarding the run time error (e.g. "Run Time Error Code 53")?

This article has been dead for over six months. Start a new discussion instead.