GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2012-04-11 21:30:12

Big J
Member
Registered: 2009-07-26
Posts: 5

Check for TUVAZ!

I noticed some scripts require that "Treat Uninitialized Variables As Zero" (TUVAZ) be unchecked, such as collision_triangle_init().

Well, a simple way to check that is something like this:

if (variable_global_exists(""))
    show_error("Error 0xn00b: You fail at using Game Maker. Treating unknown variables as zero is a disease", true);

EDIT: The indentation is not working.

Last edited by Big J (2012-04-11 21:31:07)

Offline

#2 2012-04-12 02:42:52

xot
Administrator
Registered: 2007-08-18
Posts: 1,201

Re: Check for TUVAZ!

Not only that, those same scripts won't work in newer versions of GameMaker that don't properly support that kind of variable checking.

Although I like your solution, I think in the future I'll just separate those portions of the scripts into their own initialization scripts.

The indentation thing is a side-effect of the code highlighter which is actually a code reformater. Only code within { curly braces } is indented.


Abusing forum power since 1986.

Offline

#3 2012-05-03 05:53:33

xDanielx
Member
Registered: 2009-01-02
Posts: 38

Re: Check for TUVAZ!

Nice solution! smile

Offline

#4 2013-06-06 02:38:42

johnson33445
Member
Registered: 2013-06-06
Posts: 1

Re: Check for TUVAZ!

that's a good idea...well done and keep it up

Last edited by johnson33445 (2014-11-20 03:06:08)

Offline

Board footer

Powered by FluxBB