Naike
2008-11-18 17:16:40
Everytime i use FindColorTolerance i need to enter two vars, it's common in most functions! But what if i only use these functions to check if something is there?.
Then i need to declare 2 pointless vars everytime, which can be avoided! How?
Make 2 Global vars in SRL, WasteX, WasteY (Not the best names).
This is something ive been thinking about since i started scripting, i think some of you have come across this before aswell.
That's why i need you to vote, Needed or not?
EvilChicken!
2008-11-18 17:32:59
Not really needed.
You see, if you declare two variables locally inside a procedure/function, they are freed once you exit out of that proc/function. If you declare those two vars globally, they would go against their purpose. (In what you're trying to achieve here atleast..)
noidea
2008-11-18 19:05:50
No, it will change every thing completly. I hate change.
Wizzup?
2008-11-18 19:12:38
Global Variables used to be in SRL. They have been taken out because they are generally a pain to work with. Especially if you want to find out what bugs, and where.
Bam Bam
2008-11-18 19:45:35
Yeah no to this. Its not hard to declare a couple local variables.
boberman
2008-11-18 20:21:03
Heck no. Making a global variable just for the purpose of storing waste data is a waist. It takes one variable to take care of all your waist values, I think your script can handle that.
Bobarkinator
2008-11-18 20:28:05
SRL used to have global X and Y vars…among other things. Pretty darn annoying.
lordsaturn
2008-11-22 00:12:04
Wouldn't that take up more memory than having a local variable?
Markus
2008-11-22 02:36:23
I think all people above me explained it well.
Closed.