FANDOM


Uninitialized Variable

  • An uninitialized variable error occurs when you call upon a non existent variable. Unless the variable is attatched to an entity such as the level or self; it must be defined prior to using it.

Example of error:

function()
{
    self IPrintLn( word ); // the variable word is not declared anywhere
}


Example of fix:

function( word ) // the variable word is being passed as an argument
{
    self IPrintLn( word );
}

or

function()
{
    word = "hey"; // the variable word is being declared as a string
    self IPrintLn( word );
}


Unknown Function

  • An unknown function is basically the same thing as an uninitialized variable but with a function. Before you call upon a function, you must make sure that it exists.
  • Usually this error occurs because of a spelling mistake.

Example of error:

self thread funcsion(); // calling a non-existent function (spelling mistake)

function()
{
    self IPrintLn( "hey i'm a function!" );
}


Bad Syntax

A bad syntax will occur if you don't follow the "rules" or "syntax" of GSC. Some common mistakes include....

  • Missing a semi-collon or having too many.
  • Missing a bracket/parenthesis/french curly brace or having too many.
  • Missing a forward/backwards slash, having too many or having them the wrong way.
  • Bad use of operators in different statements.
  • Starting a function/variable with a space or number.

Examples:

function()
{
    self IPrintLnBold( "hey" ) // missing a semi-colon
    self IPrintLnBold( "hey" );; // having to many semi-colons

    self IPrintLnBold(( "hey" ); //having too many parenthesis
    self IPrintLnBold( "hey" ; // missing a parenthesis

    self IPrintLnBold( "hey" ); \\ my developer comment is the wrong way..

    if( self.health = 100 ) // incorrect operator syntax
       
    123 = "hey"; // variable/function cannot start with spaces or numbers
}


Bad Token

  • A bad token is the result of having too many quotation marks or not having enough.

Example:

function()
{
    self IPrintLnBold( "hey ); // missing a quotation mark
   
    self IPrintLnBold( ""hey" ); //having to many quotation marks
}


Arithmetic Overflow

  • An arithmetic overflow error is caused by exceeding the starting amount of bytes in a patch.
    • This can be fixed by looking in the bottom right corner of FF Viewer to make sure you don't exceed the limit.
  • Warning: Once you receive this error, the patch will become corrupted and unusable.


Unexpected End of File Found

  • An unexpected end of file found error occurs when you don't finish a multi-line developer comment. The game will think the developer comment is never ending, therefore comming to a conclusion that it has reached the end of the file.

Example:

function()
{
    /*hey
    what's up
    this comment never
    ends y0...
}


Attempted to Overrun String in Call to Val()

  • This error occurs when you have over 255 bytes in a string.
  • When creating a string make sure it doesn't surpass one line in length and you should be fine.