Hi,
I'm trying to make a simple 6 question quiz. I've made a global variable named gScore with this code:
global gScore
on startMovie me
gScore = 0
end
I have this code on each of the 6 correct buttons:
on mouseUp
gScore = gScore + 1
end
I tried adding this code to the final correct button:
on mouseUp
if gScore > 4
go to "pass"
else
go to "fail"
end
but I get an error mesage that says " Script error:Variable used before assigned a value
ifgScore >?4
Obviously I'm doing something wrong or missing a step (or 2 or 3). Would anyone please take pity on a newb and point me in the right direction? I'd really appreciate it. Thanks.
Cheers~Frank
I'm trying to make a simple 6 question quiz. I've made a global variable named gScore with this code:
global gScore
on startMovie me
gScore = 0
end
I have this code on each of the 6 correct buttons:
on mouseUp
gScore = gScore + 1
end
I tried adding this code to the final correct button:
on mouseUp
if gScore > 4
go to "pass"
else
go to "fail"
end
but I get an error mesage that says " Script error:Variable used before assigned a value
ifgScore >?4
Obviously I'm doing something wrong or missing a step (or 2 or 3). Would anyone please take pity on a newb and point me in the right direction? I'd really appreciate it. Thanks.
Cheers~Frank