M
molo32
Guest
how to make the ide detect if the variable is declared?
i use game maker studio 1.4
I want to know if game maker has a way to check if a variable is declared.
imagine object 1 has the variable "life" and object 2 has
this will give an error when compiling because lif is misspelled and does not belong to object 2.
this will give an error when compiling because life is not declared in object 2.
what will work is this
it would not be better if the ide shows you the error while you write,
something like "local or global variable not declared"
and avoid waiting for it to compile and show you the error.
Imagine that you misspelled a variable and these hours when you finally compile and realize that you have errors because those variables do not exist in the object. It is a waste of time.
i use game maker studio 1.4
I want to know if game maker has a way to check if a variable is declared.
imagine object 1 has the variable "life" and object 2 has
Code:
if (lif> 2) {
//
}
this will give an error when compiling because lif is misspelled and does not belong to object 2.
Code:
if (life> 2) {
//
}
what will work is this
Code:
if (object1.life> 2) {
//
}
something like "local or global variable not declared"
and avoid waiting for it to compile and show you the error.
Imagine that you misspelled a variable and these hours when you finally compile and realize that you have errors because those variables do not exist in the object. It is a waste of time.
Last edited by a moderator: