PDA

View Full Version : What is up with my Beta?



Rakki
12-13-2006, 04:51 AM
Okay... I'm trying to compile a simple ZScript, and the errors I'm running across are that X and waitframe are uninitialized. =| Is there something I'm missing about using what are supposed to be pre-defined functions, or, is my ZHeader file just seriously screwed up?

Saffith
12-13-2006, 08:55 AM
You may want to post the script; it's hard to know without it whether those are, in fact, uninitialized.
Although if I were to guess, I'd say you're probably using waitframe() and X instead of Waitframe() and this->X. Might that be the case?

Rakki
12-13-2006, 11:18 AM
...That is ANNOYINGLY specific. I did "waitframe" and "This->X" instead of "Waitframe ()" and "this->X." I figured the this would be capitalized, since, you know, Link is capitalized. I figured they'd both be capitalized since they follow the same structure (name, pointer, variable), but, I guess I learned to always try both capitals and lowercase spellings, from now on. >_>;

DarkDragon
12-13-2006, 11:58 AM
Well, some general naming conventions currently in place:
- All built-in functions and variables, whether they are global (Waitframe(), Link, Screen, etc) or attached to a type of pointer (ffc->X) start with a capital letter. You've found the only exception, the this pointer, which is lowercase in keeping with C++ tradition.
- All data types are all-lowercase (ffc, item, int, bool, etc).
- All constants in std.zh are in all-caps.

So yes, it's not as simple as everything-is-lowercase, but on the other hand I don't think it's confusing enough to be worth changing :shrug:

Saffith
12-13-2006, 12:50 PM
Also slightly odd is that run() isn't capitalized, unlike built-in and std.zh-defined functions.

Rakki
12-14-2006, 05:04 AM
Speaking of std.zh... is it SUPPOSED to be all jumbled down in the Combo Types section? >_>; I'm looking at it with Notepad, by the way.

And since I forgot to say it before, thanks for the help, Saffith. :D

Saffith
12-14-2006, 10:32 PM
I think _L_ was the one who edited it, so it's probably using Mac-style newlines. Notepad doesn't think much of those.
That'll be fixed next beta, but it should work fine in the meantime.
Or I suppose I could just post the fixed version: std.zh (http://users.wpi.edu/~absutman/zscript/std.zh)