Indenting and commenting
Indenting
Common errors can come from the lack of indenting in your script files.
void MessyFunction()
{
int X;
int Q;
while (X = 0)
{
X = X + 1;
while(Q = 0)
{
Q = Q + 1;
}
}
}
void CleanFunction()
{
int X;
int Q;
while (X = 0)
{
X = X + 1;
while(Q = 0)
{
Q = Q + 1;
}
}
}
Notice on the indented version of the function, the curly brackets are much easier to use.
void FunctionThatWontCompile()
{
int JIM;
int BOB;
if (JIM = 0)
{
BOB - 1;
while(BOB = 0)
{
BOB = BOB + 1;
}
Commenting
Commenting on your script files will help you remember what you were trying to do.
void game()
{
'the variables S and Y are variables for my main character.
}
The compiler ingores all the text behind the '
Remember:- It's your RPG so just make it so you like it, and therefore other people like-you will also like it.