I am trying to make a GPA calculator, this page is the last step once the person has fillout out a form telling the third page the grades and how many classes he/she has.
but... here is an error I have no clue how to fix:
------------------------------------------------
Microsoft VBScript runtime error '800a0006'
Overflow
/link/third.asp, line 78
---------------------------------------------------
here is my code for the third page, where I announce gpa's value is where the error accurs (line 78)
--------------------------------------------------
<%@ Language="VBscript" %>
<%
dim noclasses, hoursnew, arrgrade(8)
dim arrhour(8), counter, counter2, total, grandtotal
counter = 1
counter2 = 1
noclasses = request.form("classesnum")
hoursnew = request.form("hoursnew")
arrhour(hoursnew)= array(request.form("1"), request.form("2"), request.form("3"), request.form("4"), request.form("5"), request.form("6"), request.form("7"), request.form("8"))
arrgrade(hoursnew)= array(1, 2, 3, 4, 5, 6, 7, 8)
for score = 1 to hoursnew
if arrhour(counter) = "A+" then
arrgrade(counter2)= 4.33
elseif arrhour(counter)= "A" then
arrgrade(counter2)= 4.0
elseif arrhour(counter)= "A-" then
arrgrade(counter2)= 3.67
elseif arrhour(counter)= "B+" then
arrgrade(counter2)= 3.33
elseif arrhour(counter)= "B" then
arrgrade(counter2)= 3.00
elseif arrhour(counter)= "B-" then
arrgrade(counter2)= 2.67
elseif arrhour(counter)= "C+" then
arrgrade(counter2)= 2.33
elseif arrhour(counter)= "C" then
arrgrade(counter2)= 2.00
elseif arrhour(counter)= "C-" then
arrgrade(counter2)= 1.67
elseif arrhour(counter)= "D+" then
arrgrade(counter2)= 1.33
elseif arrhour(counter)= "D" then
arrgrade(counter2)= 1.00
elseif arrhour(counter)= "D-" then
arrgrade(counter2)= .67
else
arrgrade= 0
end if
counter = counter + 1
counter2 = counter2 + 1
next
%>
<% total= arrgrade(1) + arrgrade(2) + arrgrade(3) + arrgrade(4) + arrgrade(5) + arrgrade(6) + arrgrade(7) + arrgrade(8)
gpa = total / classesnum
%>
Here is your GPAbr>
<%=gpa%>



br>



Bookmarks