Errors List

From SA-MP Wiki

Jump to: navigation, search

Contents

General Pawn Error List

This pages contains all errors and warning issued by the Pawn Compiler.

Error categories

Errors are separated into three classes:

Errors

  • Describe situations where the compiler is unable to generate appropriate code.
  • Errors messages are numbered from 1 to 99.

Fatal errors

  • Fatal errors describe errors from which the compiler cannot recover.
  • Parsing is aborted.
  • Fatal error messages are numbered from 100 to 199.

Warnings

  • Warnings are displayed for unintended compiler assumptions and common mistakes.
  • Warning messages are numbered from 200 to 299.

Commonly Seen Warnings

loose indentation (217)

The compiler will issue this warning if the code indentation is wrong, example:

Good:

if(condition)
{
    action();
    result();
}

Bad:

if(condition)
{
    action();
  result();
}

Indentation means to push text along from the left of the page. This is used in pawn to make code easier to read.

There is a way to avoid theese warnings without indenting properly, but is not recommended by experienced scripters.

Simply put

#pragma tabsize 0

At the top of your script.

Personal tools