That is why you should declare variables as
local . Although, about 100 % of the shared around here code doesn't, issues seems to be mostly limited to people missing this in the docs,
classes wrote:When the script is loaded, this constructs an object and stores it in the global (or in v1.1.05+, super-global) variable ClassName.
source
Also, if you use
v2. you will get an error when you try to use the class after you have overwritten the reference in the variable
className. Eg,
Code: Select all
test:=""
test.f() ; Error on v2, v1 is silent
class test{
f(){
}
}
This is of course very convenient and you will save about 4 hours of scratching your head
Cheers.