Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Dir

4 replies · 1,522 views · Started 14 June 2008

Why does it say that 'writing to Dir is currently undefined' in ZScript.txt?

It's always worked when I've tried it...

Saying something is undefined... means that the developers reserve the right to change that behaviour if the necessity springs up. But most of the time it means that the developers haven't sanitised the functions to ensure that those out-of-range inputs don't mess stuff up.

It's a technical term, and basically means "we won't stop you from writing to this variable, but we don't guarantee anything will or won't happen if you do. It might work fine on some enemies, give Link 100 rupees on others, and crash the game on yet others. It might work fine in this build, and crash the game in the next build. It might work fine on some computers, and crash the game on others."

If you're familiar with C, reading from an uninitialized variable, or a statement like "int x = y++ + y++;" are other examples of undefined behavior.