#Is this safe to use?
46 messages · Page 1 of 1 (latest)
The only thing that makes it unsafe, is if you happen to try and use them as normal keywords (like variables)
Which sure, you might never do that
But if you happen to use a library or other kind of resource that does, that has a chance of affecting those in drastic ways
what do You mean? how use?
for(var T = 0; T < 10; ++T) {
show_debug_message(T);
}
// Or
self.T = 32;
// Or
inst.T = 32;
// Or
with(inst) {
T = 32;
}
Macros will automatically replace keywords, even variables accessed via the dot operator, as the macro equivalent
so i simply won't be able to declare a variable with this name?
Sort of yeah
2024.14 and whatnot should be more acceptable in those cases as they will treat the normally restricted keywords "as is" in those versions.
So the macros would just replace them as self.true/ var true = 0;/inst.true = 32;
The only one which might not work is the implicit self true (since it'll just be a constant at that point)
But I'm also saying this because even if you avoid it, it doesn't mean everyone else is in their own code
And if you happen to take in a resource that does use T or F as variables, you may get a conflict, or an unexpected crash
oh
This is pretty much the same case if you were to name an asset T or F
It's a constant namespace conflict
so You're saying that if I declare a macro in an object, it'll be accessible everywhere?
That is correct
Macros are find + replace global
Every single instance and script will have access to the same macro
Because it'll just find + replace it
If you want them locally or just temporarily, I would do var T = true and var F = false
(Though imo I don't like shortening those keywords)
that's a personal choice yeah
Yeah haha
not sure what Your nickname is similar to... 
I am the one and only
I made Overtale and Nablarune
I don't know who you are talking about
Yup that's me
I'm glad someone recognises me for who I am and not for some other person who doesn't exist
good
I made a death by glamour song for a fangame that other people make and they said that they didn't need it bruh
Idc bout them actually, it'll stay for my portfolio
okay thank yew
No worries, happy gamedeving!
