ID:684999
 
Keywords: weird
(See the best response by .screw.)
Code:
var
list
SixOne=list("25","3.5","Flash","Magnetic","Read/Write Head","Actuator","Head","4","Hybrid","ReadyDrive","MBR","512","OS","NTFS")

mob
verb
SixOne()
set name = "Hard Drives: Inside A Hard Drive"
src.ri=0
var/n = 1
var/a = input("What is the size of a laptop hard drive?") as text
if(a == SixOne[n])
usr<<"You got it right!"
ri++
else
usr<<"Wrong. The answer is [SixOne[n]]"


Problem description:
I get this:
runtime error: cannot read from list
proc name: Hard Drives: Inside A Hard Drive (/mob/verb/SixOne)
source file: Hard Drives - Inside A Hard Drive.dm,12
usr: Ganing (/mob)
src: Ganing (/mob)
call stack:
Ganing (/mob): Hard Drives: Inside A Hard Drive()

All I can say is I have no idea what is going on. I don't know why it's doing this. I must be over-complicating it because I'm not seeing what's wrong.
It's not giving me a error.
Best response
That verb should run fine. I did a quick test and no errors occurred:
var/list/SixOne = list("25", "3.5")

mob/verb
SixOne()
var/a = input("Say 25...") as text
if(a == SixOne[1]) world << "SI"
He found out the problem ^^.
Had 2 same named variables. One was located in a var/ and the other in mob/var/.