ID:262892
 
Code:
client/Topic(href,href_list[])
if(href_list["wrong"])
var/n=(href_list["wrong"])
usr<<browse(null,"window=[n]")
if(n==1)
usr<<browse("blah","window=2")
if(n==2)
usr<<browse("blah","window=3")
if(n==3)
usr<<browse("blah","window=4")
if(n==4)
var/grade=usr.correct/4
usr<<"[grade]"
usr.correct=0
else
usr<<n
return ..()


Problem description:
The proper window is closes, but when the if procs check the value of n it says it's none of them. So I put that else in there for debugging and it says n IS one of those numbers.

I think you need to use text2num().

var/n=text2num(href_list["wrong"])
In response to Cheetoz
Thanks, Cheetoz, I didn't think of that. That fixed it.