how do i make local variables within the ruby script. i just can't seemed to get it
whe i initialize my variable and assign a value to it (integer) and then when i use it in that same script it gives me an error that this variable has not been defined
i know i'm missing something but i don't know what it is
example
01: class MyClass
02: var1 = 100
03: def initialize
04: super(var1,var1, 100,100)
05: end
06:...and so on...
i get an error that var1 is "undefined local variable" at line 4.
can some one tell me what i'm missing
thx
whe i initialize my variable and assign a value to it (integer) and then when i use it in that same script it gives me an error that this variable has not been defined
i know i'm missing something but i don't know what it is
example
01: class MyClass
02: var1 = 100
03: def initialize
04: super(var1,var1, 100,100)
05: end
06:...and so on...
i get an error that var1 is "undefined local variable" at line 4.
can some one tell me what i'm missing
thx