Advertisement
Maddin

PAWN Errors as PHP Array

Feb 17th, 2012
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 42.57 KB | None | 0 0
  1. $errorList = array(
  2.     001 => array(
  3.         'number' => 001,
  4.         'category' => 'Error',
  5.         'msg' => 'expected token: token, but found token',
  6.         'desc' => 'A required token is omitted.'
  7.     ),
  8.     002 => array(
  9.         'number' => 002,
  10.         'category' => 'Error',
  11.         'msg' => 'only a single statement (or expression) can follow each "case"',
  12.         'desc' => 'Every case in a switch statement can hold exactly one statement. To put multiple statements in a case, enclose these statements between braces (which creates a compound statement).'
  13.     ),
  14.     003 => array(
  15.         'number' => 003,
  16.         'category' => 'Error',
  17.         'msg' => 'declaration of a local variable must appear in a compound block',
  18.         'desc' => 'The declaration of a local variable must appear between braces ("{. . .}") at the active scope level.'
  19.     ),
  20.     004 => array(
  21.         'number' => 004,
  22.         'category' => 'Error',
  23.         'msg' => 'function name is not implemented',
  24.         'desc' => 'There is no implementation for the designated function. The function may have been "forwardly" declared —or prototyped— but the full function definition including a statement, or statement block, is missing.'
  25.     ),
  26.     005 => array(
  27.         'number' => 005,
  28.         'category' => 'Error',
  29.         'msg' => 'function may not have arguments',
  30.         'desc' => 'The function main is the program entry point. It may not have arguments.'
  31.     ),
  32.     006 => array(
  33.         'number' => 006,
  34.         'category' => 'Error',
  35.         'msg' => 'must be assigned to an array',
  36.         'desc' => 'String literals or arrays must be assigned to an array. This error message may also indicate a missing index (or indices) at the array on the right side of the "=" sign.'
  37.     ),
  38.     007 => array(
  39.         'number' => 007,
  40.         'category' => 'Error',
  41.         'msg' => 'operator cannot be redefined',
  42.         'desc' => 'Only a select set of operators may be redefined, this operator is not one of them. See page 84 for details.'
  43.     ),
  44.     008 => array(
  45.         'number' => 008,
  46.         'category' => 'Error',
  47.         'msg' => 'must be a constant expression; assumed zero',
  48.         'desc' => 'The size of arrays and the parameters of most directives must be constant values.'
  49.     ),
  50.     009 => array(
  51.         'number' => 009,
  52.         'category' => 'Error',
  53.         'msg' => 'invalid array size (negative, zero or out of bounds)',
  54.         'desc' => 'The number of elements of an array must always be 1 or more. In addition, an array that big that it does exceeds the range of a cell is invalid too.'
  55.     ),
  56.     010 => array(
  57.         'number' => 010,
  58.         'category' => 'Error',
  59.         'msg' => 'illegal function or declaration',
  60.         'desc' => 'The compiler expects a declaration of a global variable or of a function at the current location, but it cannot interpret it as such.'
  61.     ),
  62.     011 => array(
  63.         'number' => 011,
  64.         'category' => 'Error',
  65.         'msg' => 'invalid outside functions',
  66.         'desc' => 'The instruction or statement is invalid at a global level. Local labels and (compound) statements are only valid if used within functions.'
  67.     ),
  68.     012 => array(
  69.         'number' => 012,
  70.         'category' => 'Error',
  71.         'msg' => 'invalid function call, not a valid address',
  72.         'desc' => 'The symbol is not a function.'
  73.     ),
  74.     013 => array(
  75.         'number' => 013,
  76.         'category' => 'Error',
  77.         'msg' => 'no entry point (no public functions)',
  78.         'desc' => 'The file does not contain a main function or any public function.'
  79.     ),
  80.     014 => array(
  81.         'number' => 014,
  82.         'category' => 'Error',
  83.         'msg' => 'invalid statement; not in switch',
  84.         'desc' => 'The statements case and default are only valid inside a switch statement.'
  85.     ),
  86.     015 => array(
  87.         'number' => 015,
  88.         'category' => 'clause to be the last clause in a ',
  89.         'msg' => '"default" must be the last clause in switch statement pawn requires the ',
  90.         'desc' => 'default '
  91.     ),
  92.     016 => array(
  93.         'number' => 016,
  94.         'category' => 'Error',
  95.         'msg' => 'multiple defaults in "switch"',
  96.         'desc' => 'Each switch statement may only have one default clause.'
  97.     ),
  98.     017 => array(
  99.         'number' => 017,
  100.         'category' => 'Error',
  101.         'msg' => 'undefined symbol symbol',
  102.         'desc' => 'The symbol (variable, constant or function) is not declared.'
  103.     ),
  104.     018 => array(
  105.         'number' => 018,
  106.         'category' => 'Error',
  107.         'msg' => 'initialization data exceeds declared size',
  108.         'desc' => 'An array with an explicit size is initialized, but the number of initiallers exceeds the number of elements specified. For example, in "arr[3]={1,2,3,4};" the array is specified to have three elements, but there are four initiallers.'
  109.     ),
  110.     019 => array(
  111.         'number' => 019,
  112.         'category' => 'Error',
  113.         'msg' => 'not a label: name',
  114.         'desc' => 'A goto statement branches to a symbol that is not a label.'
  115.     ),
  116.     020 => array(
  117.         'number' => 020,
  118.         'category' => 'Error',
  119.         'msg' => 'invalid symbol name',
  120.         'desc' => 'A symbol may start with a letter, an underscore or an "at" sign ("@") and may be followed by a series of letters, digits, underscore characters and "@" characters.'
  121.     ),
  122.     021 => array(
  123.         'number' => 021,
  124.         'category' => 'Error',
  125.         'msg' => 'symbol already defined: identifier',
  126.         'desc' => 'The symbol was already defined at the current level.'
  127.     ),
  128.     022 => array(
  129.         'number' => 022,
  130.         'category' => 'Error',
  131.         'msg' => 'must be lvalue (non-constant)',
  132.         'desc' => 'The symbol that is altered (incremented, decremented, assigned a value, etc.) must be a variable that can be modified (this kind of variable is called an lvalue). Functions, string literals, arrays and constants are no lvalues. Variables declared with the "const" attribute are no lvalues either.'
  133.     ),
  134.     023 => array(
  135.         'number' => 023,
  136.         'category' => 'Error',
  137.         'msg' => 'array assignment must be simple assignment',
  138.         'desc' => 'When assigning one array to another, you cannot combine an arithmetic operation with the assignment (e.g., you cannot use the "+=" operator).'
  139.     ),
  140.     024 => array(
  141.         'number' => 024,
  142.         'category' => 'Error',
  143.         'msg' => '"break" or "continue" is out of context',
  144.         'desc' => 'The statements break and continue are only valid inside the context of a loop (a do, for or while statement). Unlike the languages C/C++ and Java, break does not jump out of a switch statement.'
  145.     ),
  146.     025 => array(
  147.         'number' => 025,
  148.         'category' => 'Error',
  149.         'msg' => 'function heading di ers from prototype',
  150.         'desc' => 'The number of arguments given at a previous declaration of the function does not match the number of arguments given at the current declaration.'
  151.     ),
  152.     026 => array(
  153.         'number' => 026,
  154.         'category' => 'Error',
  155.         'msg' => 'no matching "#if..."',
  156.         'desc' => 'The directive #else or #endif was encountered, but no matching #if directive was found.'
  157.     ),
  158.     027 => array(
  159.         'number' => 027,
  160.         'category' => 'Error',
  161.         'msg' => 'invalid character constant',
  162.         'desc' => 'One likely cause for this error is the occurrence of an unknown escape sequence, like "\x". Putting multiple characters between single quotes, as in ’abc’ also issues this error message. A third cause for this error is a situation where a character constant was expected, but none (or a non-character expression) were provided.'
  163.     ),
  164.     028 => array(
  165.         'number' => 028,
  166.         'category' => 'Error',
  167.         'msg' => 'invalid subscript (not an array or too many subscripts): identifier',
  168.         'desc' => 'The subscript operators "[" and "]" are only valid with arrays. The number of square bracket pairs may not exceed the number of dimensions of the array.'
  169.     ),
  170.     029 => array(
  171.         'number' => 029,
  172.         'category' => 'Error',
  173.         'msg' => 'invalid expression, assumed zero',
  174.         'desc' => 'The compiler could not interpret the expression.'
  175.     ),
  176.     030 => array(
  177.         'number' => 030,
  178.         'category' => 'Error',
  179.         'msg' => 'compound statement not closed at the end of file (started at line number)',
  180.         'desc' => 'An unexpected end of file occurred. One or more compound statements are still unfinished (i.e. the closing brace "}" has not been found). The line number where the compound statement started is given in the message.'
  181.     ),
  182.     031 => array(
  183.         'number' => 031,
  184.         'category' => 'Error',
  185.         'msg' => 'unknown directive',
  186.         'desc' => 'The character "#" appears first at a line, but no valid directive was specified.'
  187.     ),
  188.     032 => array(
  189.         'number' => 032,
  190.         'category' => 'Error',
  191.         'msg' => 'array index out of bounds',
  192.         'desc' => 'The array index is larger than the highest valid entry of the array.'
  193.     ),
  194.     033 => array(
  195.         'number' => 033,
  196.         'category' => 'Error',
  197.         'msg' => 'array must be indexed (variable name)',
  198.         'desc' => 'An array as a whole cannot be used in a expression; you must indicate an element of the array between square brackets.'
  199.     ),
  200.     034 => array(
  201.         'number' => 034,
  202.         'category' => 'Error',
  203.         'msg' => 'argument does not have a default value (argument index)',
  204.         'desc' => 'You can only use the argument placeholder when the function definition specifies a default value for the argument.'
  205.     ),
  206.     035 => array(
  207.         'number' => 035,
  208.         'category' => 'Error',
  209.         'msg' => 'argument type mismatch (argument index)',
  210.         'desc' => 'The argument that you pass is di erent from the argument that the function expects, and the compiler cannot convert the passed-in argument to the required type. For example, you cannot pass the literal value "1" as an argument when the function expects an array or a reference.'
  211.     ),
  212.     036 => array(
  213.         'number' => 036,
  214.         'category' => 'Error',
  215.         'msg' => 'empty statement',
  216.         'desc' => 'The line contains a semicolon that is not preceded by an expression. pawn does not support a semicolon as an empty statement, use an empty compound block instead.'
  217.     ),
  218.     037 => array(
  219.         'number' => 037,
  220.         'category' => 'Error',
  221.         'msg' => 'invalid string (possibly non-terminated string)',
  222.         'desc' => 'A string was not well-formed; for example, the final quote that ends a string is missing, or the filename for the #include directive was not enclosed in double quotes or angle brackets.'
  223.     ),
  224.     038 => array(
  225.         'number' => 038,
  226.         'category' => 'Error',
  227.         'msg' => 'extra characters on line',
  228.         'desc' => 'There were trailing characters on a line that contained a directive (a directive starts with a # symbol, see page 116).'
  229.     ),
  230.     039 => array(
  231.         'number' => 039,
  232.         'category' => 'Error',
  233.         'msg' => 'constant symbol has no size',
  234.         'desc' => 'A variable has a size (measured in a number of cells), a constant has no size. That is, you cannot use a (symbolic) constant with the sizeof operator, for example.'
  235.     ),
  236.     040 => array(
  237.         'number' => 040,
  238.         'category' => 'Error',
  239.         'msg' => 'duplicate "case" label (value value)',
  240.         'desc' => 'A preceding "case label" in the list of the switch statement evaluates to the same value.'
  241.     ),
  242.     041 => array(
  243.         'number' => 041,
  244.         'category' => 'Error',
  245.         'msg' => 'invalid ellipsis, array size is not known',
  246.         'desc' => 'You used a syntax like "arr[] = { 1, ... };", which is invalid, because the compiler cannot deduce the size of the array from the declaration.'
  247.     ),
  248.     042 => array(
  249.         'number' => 042,
  250.         'category' => 'Error',
  251.         'msg' => 'invalid combination of class specifiers',
  252.         'desc' => 'A function or variable is denoted as both "public" and "native", which is unsupported. Other combinations may also be unsup- ported; for example, a function cannot be both "public" and "stock" (a variable may be declared both "public" and "stock").'
  253.     ),
  254.     043 => array(
  255.         'number' => 043,
  256.         'category' => 'Error',
  257.         'msg' => 'character constant value exceeds range for a packed string/array',
  258.         'desc' => 'When the error occurs on a literal string, it is usually an attempt to store a Unicode character in a packed string where a packed character is 8-bits. For a literal array, one of the constants does not fit in the range for packed characters.'
  259.     ),
  260.     044 => array(
  261.         'number' => 044,
  262.         'category' => 'Error',
  263.         'msg' => 'positional parameters must precede all named parameters',
  264.         'desc' => 'When you mix positional parameters and named parameters in a function call, the positional parameters must come first.'
  265.     ),
  266.     045 => array(
  267.         'number' => 045,
  268.         'category' => 'Error',
  269.         'msg' => 'too many function arguments',
  270.         'desc' => 'The maximum number of function arguments is currently limited to 64.'
  271.     ),
  272.     046 => array(
  273.         'number' => 046,
  274.         'category' => 'Error',
  275.         'msg' => 'unknown array size (variable name)',
  276.         'desc' => 'For array assignment, the size of both arrays must be explicitly defined, also if they are passed as function arguments.'
  277.     ),
  278.     047 => array(
  279.         'number' => 047,
  280.         'category' => 'Error',
  281.         'msg' => 'array sizes do not match, or destination array is too small',
  282.         'desc' => 'For array assignment, the arrays on the left and the right side of the assignment operator must have the same number of dimensions. In addition:'
  283.     ),
  284.     048 => array(
  285.         'number' => 048,
  286.         'category' => 'Error',
  287.         'msg' => 'array dimensions do not match',
  288.         'desc' => 'For an array assignment, the dimensions of the arrays on both sides of the "=" sign must match; when passing arrays to a function argument, the arrays passed to the function (in the function call) must match with the definition of the function arguments.'
  289.     ),
  290.     049 => array(
  291.         'number' => 049,
  292.         'category' => 'Error',
  293.         'msg' => 'invalid line continuation',
  294.         'desc' => 'A line continuation character (a backslash at the end of a line) is at an invalid position, for example at the end of a file or in a single line comment.'
  295.     ),
  296.     050 => array(
  297.         'number' => 050,
  298.         'category' => 'Error',
  299.         'msg' => 'invalid range',
  300.         'desc' => 'A numeric range with the syntax "n1 .. n2", where n1 and n2 are numeric constants, is invalid. Either one of the values in not a valid number, or n1 is not smaller than n2.'
  301.     ),
  302.     051 => array(
  303.         'number' => 051,
  304.         'category' => 'Error',
  305.         'msg' => 'invalid subscript, use "[ ]" operators on major dimensions and for named indices',
  306.         'desc' => 'You can use the "character array index" operator (braces: "{ }" only for the last dimension, and only when indexing the array with a number. For other dimensions, and when indexing the array with a "symbolic index" (one that starts with a "."), you must use the cell index operator (square brackets: "[ ]").'
  307.     ),
  308.     052 => array(
  309.         'number' => 052,
  310.         'category' => 'Error',
  311.         'msg' => 'multi-dimensional arrays must be fully initialized',
  312.         'desc' => 'If an array with more than one dimension is initialized at its declaration, then there must be equally many literal vectors/sub- arrays at the right of the equal sign ("=") as specified for the major dimension(s) of the array.'
  313.     ),
  314.     053 => array(
  315.         'number' => 053,
  316.         'category' => 'Error',
  317.         'msg' => 'exceeding maximum number of dimensions',
  318.         'desc' => 'The current implementation of the pawn compiler only supports arrays with one or two dimensions.'
  319.     ),
  320.     054 => array(
  321.         'number' => 054,
  322.         'category' => 'Error',
  323.         'msg' => 'unmatched closing brace',
  324.         'desc' => 'A closing brace ("}") was found without matching opening brace ("{").'
  325.     ),
  326.     055 => array(
  327.         'number' => 055,
  328.         'category' => 'Error',
  329.         'msg' => 'start of function body without function header',
  330.         'desc' => 'An opening brace ("{") was found outside the scope of a function.'
  331.     ),
  332.     056 => array(
  333.         'number' => 056,
  334.         'category' => 'Error',
  335.         'msg' => 'arrays, local variables and function arguments cannot be public',
  336.         'desc' => 'A local variable or a function argument starts with the character "@", which is invalid.'
  337.     ),
  338.     057 => array(
  339.         'number' => 057,
  340.         'category' => 'Error',
  341.         'msg' => 'Unfinished expression before compiler directive',
  342.         'desc' => 'Compiler directives may only occur between statements, not inside a statement. This error typically occurs when an expression statement is split over multiple lines and a compiler directive appears between the start and the end of the expression. This is not supported.'
  343.     ),
  344.     058 => array(
  345.         'number' => 058,
  346.         'category' => 'Error',
  347.         'msg' => 'duplicate argument; same argument is passed twice',
  348.         'desc' => 'In the function call, the same argument appears twice, possibly through a mixture of named and positional parameters.'
  349.     ),
  350.     059 => array(
  351.         'number' => 059,
  352.         'category' => 'Error',
  353.         'msg' => 'function argument may not have a default value (variable name)',
  354.         'desc' => 'All arguments of public functions must be passed explicitly. Public functions are typically called from the host application, who has no knowledge of the default parameter values. Arguments of user defined operators are implied from the expression and cannot be inferred from the default value of an argument.'
  355.     ),
  356.     060 => array(
  357.         'number' => 060,
  358.         'category' => 'Error',
  359.         'msg' => 'multiple "#else" directives between "#if . . . #endif',
  360.         'desc' => 'Two or more #else directives appear in the body between the matching #if and #endif.'
  361.     ),
  362.     061 => array(
  363.         'number' => 061,
  364.         'category' => 'Error',
  365.         'msg' => '"#elseif" directive follows an "#else" directive',
  366.         'desc' => 'All #elseif directives must appear before the #else directive. This error may also indicate that an #endif directive for a higher level is missing.'
  367.     ),
  368.     062 => array(
  369.         'number' => 062,
  370.         'category' => 'Error',
  371.         'msg' => 'number of operands does not fit the operator',
  372.         'desc' => 'When redefining an operator, the number of operands that the operator has (1 for unary operators and 2 for binary operators) must be equal to the number of arguments of the operator function.'
  373.     ),
  374.     063 => array(
  375.         'number' => 063,
  376.         'category' => 'Error',
  377.         'msg' => 'function result tag of operator name must be name',
  378.         'desc' => 'Logical and relational operators are defined as having a result that is either true (1) or false (0) and having a "bool:" tag. A user defined operator should adhere to this definition.'
  379.     ),
  380.     064 => array(
  381.         'number' => 064,
  382.         'category' => 'Error',
  383.         'msg' => 'cannot change predefined operators',
  384.         'desc' => 'One cannot define operators to work on untagged values, for example, because pawn already defines this operation.'
  385.     ),
  386.     065 => array(
  387.         'number' => 065,
  388.         'category' => 'Error',
  389.         'msg' => 'function argument may only have a single tag (argument number)',
  390.         'desc' => 'In a user defined operator, a function argument may not have multiple tags.'
  391.     ),
  392.     066 => array(
  393.         'number' => 066,
  394.         'category' => 'Error',
  395.         'msg' => 'function argument may not be a reference argument or an array (argument number)',
  396.         'desc' => 'In a user defined operator, all arguments must be cells (non-arrays) that are passed "by value".'
  397.     ),
  398.     067 => array(
  399.         'number' => 067,
  400.         'category' => 'Error',
  401.         'msg' => 'variable cannot be both a reference and an array (variable name)',
  402.         'desc' => 'A function argument may be denoted as a "reference" or as an array, but not as both.'
  403.     ),
  404.     068 => array(
  405.         'number' => 068,
  406.         'category' => 'Error',
  407.         'msg' => 'invalid rational number precision in #pragma',
  408.         'desc' => 'The precision was negative or too high. For fioating point rational numbers, the precision specification should be omitted.'
  409.     ),
  410.     069 => array(
  411.         'number' => 069,
  412.         'category' => 'Error',
  413.         'msg' => 'rational number format already defined',
  414.         'desc' => 'This #pragma confiicts with an earlier #pragma that specified a di erent format.'
  415.     ),
  416.     070 => array(
  417.         'number' => 070,
  418.         'category' => 'Error',
  419.         'msg' => 'rational number support was not enabled',
  420.         'desc' => 'A rational literal number was encountered, but the format for rational numbers was not specified.'
  421.     ),
  422.     071 => array(
  423.         'number' => 071,
  424.         'category' => 'Error',
  425.         'msg' => 'user-defined operator must be declared before use (func- tion name)',
  426.         'desc' => 'Like a variable, a user-defined operator must be declared before its first use. This message indicates that prior to the declaration of the user-defined operator, an instance where the operator was used on operands with the same tags occurred. This may either indicate that the program tries to make mixed use of the default operator and a user-defined operator (which is unsupported), or that the user-defined operator must be "forwardly declared".'
  427.     ),
  428.     072 => array(
  429.         'number' => 072,
  430.         'category' => 'Error',
  431.         'msg' => '"sizeof" operator is invalid on "function" symbols',
  432.         'desc' => 'You used something like "sizeof MyCounter" where the symbol "MyCounter" is not a variable, but a function. You cannot request the size of a function.'
  433.     ),
  434.     073 => array(
  435.         'number' => 073,
  436.         'category' => 'Error',
  437.         'msg' => 'function argument must be an array (argument name)',
  438.         'desc' => 'The function argument is a constant or a simple variable, but the function requires that you pass an array.'
  439.     ),
  440.     074 => array(
  441.         'number' => 074,
  442.         'category' => 'Error',
  443.         'msg' => '#define pattern must start with an alphabetic character',
  444.         'desc' => 'Any pattern for the #define directive must start with a letter, an underscore ("_") or an "@"-character. The pattern is the first word that follows the #define keyword.'
  445.     ),
  446.     075 => array(
  447.         'number' => 075,
  448.         'category' => 'Error',
  449.         'msg' => 'input line too long (after substitutions)',
  450.         'desc' => 'Either the source file contains a very long line, or text substitutions make a line that was initially of acceptable length grow beyond its bounds. This may be caused by a text substitution that causes recursive substitution (the pattern matching a portion of the replacement text, so that this part of the replacement text is also matched and replaced, and so forth).'
  451.     ),
  452.     076 => array(
  453.         'number' => 076,
  454.         'category' => 'Error',
  455.         'msg' => 'syntax error in the expression, or invalid function call',
  456.         'desc' => 'The expression statement was not recognized as a valid statement (so it is a "syntax error"). From the part of the string that was parsed, it looks as if the source line contains a function call in a "procedure call" syntax (omitting the parentheses), but the function result is used —assigned to a variable, passed as a parameter, used in an expression. . .'
  457.     ),
  458.     077 => array(
  459.         'number' => 077,
  460.         'category' => 'Error',
  461.         'msg' => 'malformed UTF-8 encoding, or corrupted file: filename',
  462.         'desc' => 'The file starts with an UTF-8 signature, but it contains encodings that are invalid UTF-8. If the source file was created by an editor or converter that supports UTF-8, the UTF-8 support is non-conforming.'
  463.     ),
  464.     078 => array(
  465.         'number' => 078,
  466.         'category' => 'Error',
  467.         'msg' => 'function uses both "return" and "return <value>"',
  468.         'desc' => 'The function returns both with and without a return value. The function should be consistent in always returning with a function result, or in never returning a function result.'
  469.     ),
  470.     079 => array(
  471.         'number' => 079,
  472.         'category' => 'Error',
  473.         'msg' => 'inconsistent return types (array &amp; non-array)',
  474.         'desc' => 'The function returns both values and arrays, which is not allowed. If a function returns an array, all return statements must specify an array (of the same size and dimensions).'
  475.     ),
  476.     080 => array(
  477.         'number' => 080,
  478.         'category' => 'Error',
  479.         'msg' => 'unknown symbol, or not a constant symbol (symbol name)',
  480.         'desc' => 'Where a constant value was expected, an unknown symbol or a non-constant symbol (variable) was found.'
  481.     ),
  482.     083 => array(
  483.         'number' => 083,
  484.         'category' => 'Error',
  485.         'msg' => 'a function or variable may only belong to a single automa- ton (symbol name)',
  486.         'desc' => 'There are multiple automatons in the state declaration for the indicated function or variable, which is not supported. In the case of a function: all instances of the function must belong to the same automaton. In the case of a variable: it is allowed to have several variables with the same name belonging to di erent automatons, but only in separate declarations —these are distinct variables.'
  487.     ),
  488.     084 => array(
  489.         'number' => 084,
  490.         'category' => 'Error',
  491.         'msg' => 'state confiict: one of the states is already assigned to another implementation (symbol name)',
  492.         'desc' => 'The specified state appears in the state specifier of two implemen- tations of the same function.'
  493.     ),
  494.     085 => array(
  495.         'number' => 085,
  496.         'category' => 'Error',
  497.         'msg' => 'no states are defined for symbol name',
  498.         'desc' => 'When this error occurs on a function, this function has a fall-back implementation, but no other states. If the error refers to a variable, this variable does not have a list of states between the &lt; and > characters. Use a state-less function or variable instead.'
  499.     ),
  500.     086 => array(
  501.         'number' => 086,
  502.         'category' => 'Error',
  503.         'msg' => 'unknown automaton name',
  504.         'desc' => 'The "state" statement refers to an unknown automaton.'
  505.     ),
  506.     087 => array(
  507.         'number' => 087,
  508.         'category' => 'Error',
  509.         'msg' => 'unknown state name for automaton name',
  510.         'desc' => 'The "state" statement refers to an unknown state (for the specified automaton).'
  511.     ),
  512.     088 => array(
  513.         'number' => 088,
  514.         'category' => 'Error',
  515.         'msg' => 'public variables and local variables may not have states (symbol name)',
  516.         'desc' => 'Only standard (global) variables may have a list of states (and an automaton) at the end of a declaration.'
  517.     ),
  518.     089 => array(
  519.         'number' => 089,
  520.         'category' => 'Error',
  521.         'msg' => 'state variables may not be initialized (symbol name)',
  522.         'desc' => 'Variables with a state list may not have initializers. State variables should always be initialized through an assignment (instead of at their declaration), because their initial value is indeterminate.'
  523.     ),
  524.     090 => array(
  525.         'number' => 090,
  526.         'category' => 'Error',
  527.         'msg' => 'public functions may not return arrays (symbol name)',
  528.         'desc' => 'A public function may not return an array. Returning arrays is allowed only for normal functions.'
  529.     ),
  530.     091 => array(
  531.         'number' => 091,
  532.         'category' => 'Error',
  533.         'msg' => 'first constant in an enumerated list must be initialized (symbol name)',
  534.         'desc' => 'The first constant in a list of enumerated symbolic constants must be set to a value. Any subsequent symbol is automatically set the the value of the preceding symbol +1.'
  535.     ),
  536.     092 => array(
  537.         'number' => 092,
  538.         'category' => 'Error',
  539.         'msg' => 'invalid number format',
  540.         'desc' => 'A symbol started with a digit, but is is not a valid number.'
  541.     ),
  542.     093 => array(
  543.         'number' => 093,
  544.         'category' => 'Error',
  545.         'msg' => 'array fields with a size may only appear in the final dimension',
  546.         'desc' => 'In the final dimension (the "minor" dimension), the fields of an array may optionally be declared with a size that is di erent from a single cell. On the major dimensions of an array, this is not valid, however.'
  547.     ),
  548.     094 => array(
  549.         'number' => 094,
  550.         'category' => 'Error',
  551.         'msg' => 'invalid subscript, subscript does not match array definition regarding named indices (symbol name)',
  552.         'desc' => 'Either the array was declared with symbolic subscripts and you are indexing it with an expression, or you are indexing the array with a symbolic subscript which is not defined for the array.'
  553.     ),
  554.     100 => array(
  555.         'number' => 100,
  556.         'category' => 'Fatal Error',
  557.         'msg' => 'cannot read from file: filename',
  558.         'desc' => 'The compiler cannot find the specified file or does not have access to it.'
  559.     ),
  560.     101 => array(
  561.         'number' => 101,
  562.         'category' => 'Fatal Error',
  563.         'msg' => 'cannot write to file: filename',
  564.         'desc' => 'The compiler cannot write to the specified output file, probably caused by insu cient disk space or restricted access rights (the file could be read-only, for example).'
  565.     ),
  566.     102 => array(
  567.         'number' => 102,
  568.         'category' => 'Fatal Error',
  569.         'msg' => 'table overfiow: table name',
  570.         'desc' => 'An internal table in the pawn parser is too small to hold the required data. Some tables are dynamically growable, which means that there was insu cient memory to resize the table. The "table name" is one of the following:'
  571.     ),
  572.     103 => array(
  573.         'number' => 103,
  574.         'category' => 'Fatal Error',
  575.         'msg' => 'insu cient memory',
  576.         'desc' => 'General "out of memory" error.'
  577.     ),
  578.     104 => array(
  579.         'number' => 104,
  580.         'category' => 'Fatal Error',
  581.         'msg' => 'incompatible options: option versus option',
  582.         'desc' => 'Two option that are passed to the pawn compiler confiict with each other, or an option confiicts with the configuration of the pawn compiler.'
  583.     ),
  584.     105 => array(
  585.         'number' => 105,
  586.         'category' => 'Fatal Error',
  587.         'msg' => 'numeric overfiow, exceeding capacity',
  588.         'desc' => 'A numeric constant, notably a dimension of an array, is too large for the compiler to handle. For example, when compiled as a 16-bit application, the compiler cannot handle arrays with more than 32767 elements.'
  589.     ),
  590.     106 => array(
  591.         'number' => 106,
  592.         'category' => 'Fatal Error',
  593.         'msg' => 'compiled script exceeds the maximum memory size',
  594.         'desc' => '(number bytes)'
  595.     ),
  596.     107 => array(
  597.         'number' => 107,
  598.         'category' => 'Fatal Error',
  599.         'msg' => 'too many error/warning messages on one line',
  600.         'desc' => 'A single line that causes several error/warning messages is often an indication that the pawn parser is unable to "recover" from an earlier error. In this situation, the parser is unlikely to make any sense of the source code that follows —producing only (more) inappropriate error messages. Therefore, compilation is halted.'
  601.     ),
  602.     108 => array(
  603.         'number' => 108,
  604.         'category' => 'Fatal Error',
  605.         'msg' => 'codepage mapping file not found',
  606.         'desc' => 'The file for the codepage translation that was specified with the -c compiler option or the #pragma codepage directive could not be loaded.'
  607.     ),
  608.     109 => array(
  609.         'number' => 109,
  610.         'category' => 'Fatal Error',
  611.         'msg' => 'invalid path: path name',
  612.         'desc' => 'A path, for example for include files or codepage files, is invalid. Check the compiler options and, if used, the configuration file.'
  613.     ),
  614.     110 => array(
  615.         'number' => 110,
  616.         'category' => 'Fatal Error',
  617.         'msg' => 'assertion failed: expression',
  618.         'desc' => 'Compile-time assertion failed.'
  619.     ),
  620.     111 => array(
  621.         'number' => 111,
  622.         'category' => 'Fatal Error',
  623.         'msg' => 'user error: message',
  624.         'desc' => 'The parser fell on an #error directive.'
  625.     ),
  626.     200 => array(
  627.         'number' => 200,
  628.         'category' => 'Warning',
  629.         'msg' => 'symbol is truncated to number characters',
  630.         'desc' => 'The symbol is longer than the maximum symbol length. The maximum length of a symbol depends on whether the symbol is native, public or neither. Truncation may cause di erent symbol names to become equal, which may cause error 021 or warning 219.'
  631.     ),
  632.     201 => array(
  633.         'number' => 201,
  634.         'category' => 'Warning',
  635.         'msg' => 'redefinition of constant/macro (symbol name)',
  636.         'desc' => 'The symbol was previously defined to a di erent value, or the text substitution macro that starts with the prefix name was redefined with a di erent substitution text.'
  637.     ),
  638.     202 => array(
  639.         'number' => 202,
  640.         'category' => 'Warning',
  641.         'msg' => 'number of arguments does not match definition',
  642.         'desc' => 'At a function call, the number of arguments passed to the function (actual arguments) di ers from the number of formal arguments declared in the function heading. To declare functions with variable argument lists, use an ellipsis (...) behind the last known argument in the function heading; for example: print(formatstring,...); (see page 78).'
  643.     ),
  644.     203 => array(
  645.         'number' => 203,
  646.         'category' => 'Warning',
  647.         'msg' => 'symbol is never used: identifier',
  648.         'desc' => 'Asymbol is defined but never used. Public functions are excluded from the symbol usage check (since these may be called from the outside).'
  649.     ),
  650.     204 => array(
  651.         'number' => 204,
  652.         'category' => 'Warning',
  653.         'msg' => 'symbol is assigned a value that is never used: identifier',
  654.         'desc' => 'Avalue is assigned to a symbol, but the contents of the symbol are never accessed.'
  655.     ),
  656.     205 => array(
  657.         'number' => 205,
  658.         'category' => 'Warning',
  659.         'msg' => 'redundant code: constant expression is zero',
  660.         'desc' => 'Where a conditional expression was expected, a constant expression with the value zero was found, e.g. "while (0)" or "if (0)".'
  661.     ),
  662.     206 => array(
  663.         'number' => 206,
  664.         'category' => 'Warning',
  665.         'msg' => 'redundant test: constant expression is non-zero',
  666.         'desc' => 'Where a conditional expression was expected, a constant expression with a non-zero value was found, e.g. if (1). The test is redundant, because the conditional code is always executed.'
  667.     ),
  668.     207 => array(
  669.         'number' => 207,
  670.         'category' => 'Warning',
  671.         'msg' => 'unknown "#pragma"',
  672.         'desc' => 'The compiler ignores the pragma. The #pragma directives may change between compilers of di erent vendors and between di erent versions of a compiler of the same version.'
  673.     ),
  674.     208 => array(
  675.         'number' => 208,
  676.         'category' => 'Warning',
  677.         'msg' => 'function with tag result used before definition, forcing',
  678.         'desc' => 'reparse'
  679.     ),
  680.     209 => array(
  681.         'number' => 209,
  682.         'category' => 'Warning',
  683.         'msg' => 'function should return a value',
  684.         'desc' => 'The function does not have a return statement, or it does not have an expression behind the return statement, but the function’s result is used in a expression.'
  685.     ),
  686.     210 => array(
  687.         'number' => 210,
  688.         'category' => 'Warning',
  689.         'msg' => 'possible use of symbol before initialization: identifier',
  690.         'desc' => 'A local (uninitialized) variable appears to be read before a value is assigned to it. The compiler cannot determine the actual order of reading from and storing into variables and bases its assumption of the execution order on the physical appearance order of statements an expressions in the source file.'
  691.     ),
  692.     211 => array(
  693.         'number' => 211,
  694.         'category' => 'Warning',
  695.         'msg' => 'possibly unintended assignment',
  696.         'desc' => 'Where a conditional expression was expected, the assignment operator (=) was found instead of the equality operator (==). As this is a frequent mistake, the compiler issues a warning. To avoid this message, put parentheses around the expression, e.g. if ( (a=2) ).'
  697.     ),
  698.     212 => array(
  699.         'number' => 212,
  700.         'category' => 'Warning',
  701.         'msg' => 'possibly unintended bitwise operation',
  702.         'desc' => 'Where a conditional expression was expected, a bitwise operator (&amp; or |) was found instead of a Boolean operator (&amp;&amp; or ||). In situations where a bitwise operation seems unlikely, the compiler issues this warning. To avoid this message, put parentheses around the expression.'
  703.     ),
  704.     213 => array(
  705.         'number' => 213,
  706.         'category' => 'Warning',
  707.         'msg' => 'tag mismatch',
  708.         'desc' => 'A tag mismatch occurs when:'
  709.     ),
  710.     214 => array(
  711.         'number' => 214,
  712.         'category' => 'Warning',
  713.         'msg' => 'possibly a "const" array argument was intended: identifier',
  714.         'desc' => 'Arrays are always passed by reference. If a function does not modify the array argument, however, the compiler can sometimes generate more compact and quicker code if the array argument is specifically marked as "const".'
  715.     ),
  716.     215 => array(
  717.         'number' => 215,
  718.         'category' => 'Warning',
  719.         'msg' => 'expression has no e ect',
  720.         'desc' => 'The result of the expression is apparently not stored in a variable or used in a test. The expression or expression statement is therefore redundant.'
  721.     ),
  722.     216 => array(
  723.         'number' => 216,
  724.         'category' => 'Warning',
  725.         'msg' => 'nested comment',
  726.         'desc' => 'pawn does not support nested comments.'
  727.     ),
  728.     217 => array(
  729.         'number' => 217,
  730.         'category' => 'Warning',
  731.         'msg' => 'loose indentation',
  732.         'desc' => 'Statements at the same logical level do not start in the same column; that is, the indents of the statements are di erent. Although pawn is a free format language, loose indentation frequently hides a logical error in the control fiow.'
  733.     ),
  734.     218 => array(
  735.         'number' => 218,
  736.         'category' => 'Warning',
  737.         'msg' => 'old style prototypes used with optional semicolon',
  738.         'desc' => 'When using "optional semicolons", it is preferred to explicitly declare forward functions with the forward keyword than using terminating semicolon.'
  739.     ),
  740.     219 => array(
  741.         'number' => 219,
  742.         'category' => 'Warning',
  743.         'msg' => 'local variable identifier shadows a symbol at a preceding level',
  744.         'desc' => 'A local variable has the same name as a global variable, a function, a function argument, or a local variable at a lower precedence level. This is called "shadowing", as the new local variable makes the previously defined function or variable inaccessible.'
  745.     ),
  746.     220 => array(
  747.         'number' => 220,
  748.         'category' => 'Warning',
  749.         'msg' => 'expression with tag override must appear between paren- theses',
  750.         'desc' => 'In a case statement and in expressions in the conditional operator (" fi : "), any expression that has a tag override should be en- closed between parentheses, to avoid the colon to be misinterpreted as a separator of the case statement or as part of the conditional operator.'
  751.     ),
  752.     221 => array(
  753.         'number' => 221,
  754.         'category' => 'Warning',
  755.         'msg' => 'label name identifier shadows tag name',
  756.         'desc' => 'Acode label (for the goto instruction) has the same name as a previously defined tag. This may indicate a faultily applied tag override; a typical case is an attempt to apply a tag override on the variable on the left of the = operator in an assignment statement.'
  757.     ),
  758.     222 => array(
  759.         'number' => 222,
  760.         'category' => 'Warning',
  761.         'msg' => 'number of digits exceeds rational number precision',
  762.         'desc' => 'Aliteral rational number has more decimals in its fractional part than the precision of a rational number supports. The remaining decimals are ignored.'
  763.     ),
  764.     223 => array(
  765.         'number' => 223,
  766.         'category' => 'Warning',
  767.         'msg' => 'redundant "sizeof": argument size is always 1 (symbol name)',
  768.         'desc' => 'Afunction argument has a as its default value the size of another argument of the same function. The "sizeof" default value is only useful when the size of the referred argument is unspecified in'
  769.     ),
  770.     224 => array(
  771.         'number' => 224,
  772.         'category' => 'Warning',
  773.         'msg' => 'indeterminate array size in "sizeof" expression (symbol name)',
  774.         'desc' => 'The operand of the sizeof operator is an array with an unspecified size. That is, the size of the variable cannot be determined'
  775.     ),
  776.     225 => array(
  777.         'number' => 225,
  778.         'category' => 'Warning',
  779.         'msg' => 'unreachable code',
  780.         'desc' => 'The indicated code will never run, because an instruction before (above) it causes a jump out of the function, out of a loop or elsewhere. Look for return, break, continue and goto instructions above the indicated line. Unreachable code can also be caused by an endless loop above the indicated line.'
  781.     ),
  782.     226 => array(
  783.         'number' => 226,
  784.         'category' => 'Warning',
  785.         'msg' => 'a variable is assigned to itself (symbol name)',
  786.         'desc' => 'There is a statement like "x = x" in the code. The parser checks for self assignments after performing any text and constant substitutions, so the left and right sides of an assignment may appear to be di erent at first sight. For example, if the symbol "TWO" is a constant with the value 2, then "var[TWO] = var[2]" is also a self-assignment.'
  787.     ),
  788.     227 => array(
  789.         'number' => 227,
  790.         'category' => 'Warning',
  791.         'msg' => 'more initiallers than array fields',
  792.         'desc' => 'An array that is declared with sumbolic subscripts contains more values/fields as initiallers than there are (symbolic) subscripts.'
  793.     ),
  794.     228 => array(
  795.         'number' => 228,
  796.         'category' => 'Warning',
  797.         'msg' => 'length of initialler exceeds size of the array field',
  798.         'desc' => 'The initialler for an array element contains more values than the size of that field allows. This occurs in an array that has symbolic subscripts, and where a particular subscript is declared with a size.'
  799.     ),
  800.     229 => array(
  801.         'number' => 229,
  802.         'category' => 'Warning',
  803.         'msg' => 'mixing packed and unpacked array indexing or array assignment',
  804.         'desc' => 'An array is declared as packed (with { and } braces) but indexed as unpacked (with [ and ]), or vice versa. Or one array is assigned to another and one is packed while the other is unpacked.'
  805.     ),
  806.     230 => array(
  807.         'number' => 230,
  808.         'category' => 'Warning',
  809.         'msg' => 'no implementation for state name in function name, no fall-back',
  810.         'desc' => 'A function is lacking an implementation for the indicated state. The compiler cannot (statically) check whether the function will ever be called in that state, and therefore it issues this warning. When the function would be called for the state for which no implementation exists, the abstract machine aborts with a run time error.'
  811.     ),
  812.     231 => array(
  813.         'number' => 231,
  814.         'category' => 'Warning',
  815.         'msg' => 'state specification on forward declaration is ignored',
  816.         'desc' => 'A state specification is redundant on forward declarations. The function signature must be equal for all states. Only the imple- mentations of the function are state-specific.'
  817.     ),
  818.     232 => array(
  819.         'number' => 232,
  820.         'category' => 'Warning',
  821.         'msg' => 'native function lacks a predefined index (symbol name)',
  822.         'desc' => 'The pawn compiler was configured with predefined indices for native functions, but it encountered a declaration for which it does not have an index declaration. This usually means that the script uses include files that arenot appropriate for the active configuration.'
  823.     ),
  824.     233 => array(
  825.         'number' => 233,
  826.         'category' => 'Warning',
  827.         'msg' => 'state variable name shadows a global variable',
  828.         'desc' => 'The state variable has the same name as a global variable (without state specifiers). This means that the global variable is inaccessible for a function with one of the same states as those of the variable.'
  829.     ),
  830.     234 => array(
  831.         'number' => 234,
  832.         'category' => 'Warning',
  833.         'msg' => 'function is deprecated (symbol name)',
  834.         'desc' => 'The script uses a function which as marked as "deprecated". The host application can mark (native) functions as deprecated when better alternatives for the function are available or if the function may not be supported in future versions of the host application.'
  835.     ),
  836.     235 => array(
  837.         'number' => 235,
  838.         'category' => 'Warning',
  839.         'msg' => 'public function lacks forward declaration (symbol name)',
  840.         'desc' => 'The script defines a public function, but no forward declaration of this function is present. Possibly the function name was written incorrectly. The requirement for forward declarations of public functions guards against a common error.'
  841.     ),
  842.     236 => array(
  843.         'number' => 236,
  844.         'category' => 'Warning',
  845.         'msg' => 'unknown parameter in substitution (incorrect #define pattern)',
  846.         'desc' => 'A #define pattern contains a parameter in the replacement (e.g.'//todo
  847.     ),
  848.     237 => array(
  849.         'number' => 237,
  850.         'category' => 'Warning',
  851.         'msg' => 'recursive function name',
  852.         'desc' => 'The specified function calls itself recursively. Although this is valid in pawn, a self-call is often an error. Note that this warning is only generated when the pawn parser/compiler is set to "verbose" mode.'
  853.     ),
  854.     238 => array(
  855.         'number' => 238,
  856.         'category' => 'Warning',
  857.         'msg' => 'mixing string formats in concatenation',
  858.         'desc' => 'In concatenating literals strings, strings with di erent formats (such as packed versus unpacked, and "plain" versus standard strings) were combined. This is usually an error. The parser uses the format of the first (left-most) string in the concatenation for the result.'
  859.     )
  860. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement