So I am just playing with code. So forgive me if I seem retarded and stupid. I doubt this would EVER be implemented into a script.
CODE
module Sample
class << self
def extended klass
klass.instance_variable_set :@instance, klass.new
klass.private_class_method :new
end
end
def instance
@instance
end
end
class Test
extended Sample
end
Test.instance
I am getting the error method error no such method on .instance
How ever Test<Sample states I already have the module being used why extend it.
So why am I getting a no method error? I thought what I was doing was correct.
an update:
Test.new works when it shouldnt. in windows it throws an error, oh and this script compiles in windows and works, but not in RGSS2? um confusion?
Hell even in linux it works.
Does RGSS2 not support what I am trying to do?
edit - issue fixed
also this should thread needs to be moved to script support not VX