Scripter errors

From OPU Wiki


Table of contents

Errors

The script compiler can produce the following errors:


Undetermined string

There was no closing quote on the string.

"This is an undetermined string
                               ^- Error here

Commands (and there params) must always be on a single line.


Missing left/right parentheses

Parentheses ( or ) are missing from the line. Every function can be used either with or without parantheses, but Scripter requires you to close any open parenthized function


Not a valid number

A number was expected but something else was encountered. Scripter only allows positive, decimal numbers

0    = correct
2    = correct
012  = correct and results in 12 decimal, NOT 12 Octal (=10 decimal)
-1   = error, not accepted as a number
0x12 = error, Scripter does not read HEX numbers


Property value missing. Syntax: SET property=value

Either the value wasn't what the compiler expected or there was no value at all.


String expected

Something other than a string was encountered.

"This is a string"
And this is not


Number expected

Error has been removed since build 25. All number errors are now handled by Not a valid number error above


Unknown property

The property wasn't recognised. Valid mission properties are: (bold properties are manditory)

  • NAME
  • DESCRIPTION
  • MAP
  • PLAYERS
  • MAXTECHLEVEL
  • MISSIONTYPE
  • TECHTREE
  • AUTHOR
  • UNITMISSION
  • DAYLIGHT


Valid player properties are:

  • COLONY
  • FOOD
  • ORE
  • COMMON (same as ORE)
  • RARE
  • WORKERS
  • SCIENTISTS
  • CHILDREN
  • CENTER

MAXPLAYERS must be between 1 and 6

Outpost 2 supports upto 6 players.


MAXTECHLEVEL must be between 1 and 12

There are only 12 tech levels in Outpost 2.


Invalid MISSIONTYPE

Supply a correct mission type. You can either supply a number between 1 and 12, if you are creating a campaign-mission, or one of these predefined values:

  • COLONY
  • AUTODEMO
  • TUTORIAL
  • LANDRUSH
  • SPACERACE
  • RESOURCERACE
  • MIDAS
  • LASTONESTANDING


BEACON expected

COMMON or RARE should be followed by the keyword BEACON.


Comma expected

Between 2 paramaters you must always put a comma.


Unexpected end of line

More parameters were expected, but there was nothing else on the line. Commands must always be on a single line.

This error also occurs if you end a line with a comma, even if there are no more parameters required for the specific function.


Setup incomplete

You are missing one or more setup definitions. Manditory mission properties that always have to be included are:

  • DESCRIPTION : the description appearing in the briefing
  • MAP  : the map filename
  • PLAYERS  : the number of human players
  • MISSIONTYPE : the mission type


Unknown command

The command you entered wasn't recognised. The command (or function name) is always the first thing on each line. A function cannot span more than 1 line.


Unknown type

An unknown type was supplied.


BAR yield expected

The third param of the BEACON command must be the BAR yield. Valid values are:

  • 1BAR
  • 2BAR
  • 3BAR


VARIANT type expected

An invalid VARIANT type was encountered. To have no variant, leave it empty. Valid values are:

  • VARIANT1
  • VARIANT2
  • VARIANT3

If you want it to be a fixed-yield mine, do not enter a varient type, but leave it blank (do not include the comma either).

COMMON BEACON ( 10, 10, 3BAR, VARIANT2 )   // creates varient-1 mine
COMMON BEACON ( 20, 10, 2BAR )             // creates fixed yield mine


Invalid block name

Valid blocknames are:

  • MAIN
  • PLAYER

Invalid player number

You have tried to set up a player that doesn't exist. You cannot use more players, than what you've SET the MAXPLAYERS property to.


Property can only be defined inside a block

The property was not included in the correct block. Only MAIN properties can be defined outside a block.

Cannot start new block. Close other block first

There is still an open block. You cannot BEGIN a new one without first ENDing the other one.


Undefined error

The compiler encountered an undefined error. Please contact support about this error.


UNIT expected

A UNIT definition was expected, but something else was found.


Invalid UNIT type

The UNIT type was not recognised.


Too many types

There are too many cargo or weapon parameters for this UNIT type. A Structure factory or Space Port has 6 slots for kits. Any other vehicle or structure can only have 1 weapon/cargo type.


Type not allowed here

You tried to use some invalid type, like a Lynx with a Residence as its weapon, or a Structure Factory with a Cargo Truck inside it.


Boolean expected

Valid values are:

  • 1
  • 0
  • YES
  • NO
  • TRUE
  • FALSE


Empty string not allowed here

An empty string was encountered, where a value is compulsory.


Not supported by this version

The command you have used it not supported by this version of AI-Scripter. It may be an obsolete command or one that hasn't been implemented yet.

As of version 0.2.3, i've added this error message; basicly for use with the CONNECT command. It is still not included in Scripter, and i found it prudent to warn scripters about that. This IS an error message (not just a warning), because Scripter cannot compile the command. But removing the CONNECT keyword solves the problem.



Warnings

The script compiler can produce the following warnings:


Empty string found

This empty string may have been unintended.


Setup is missing a line

You have forgotten to include one or more setup lines. A default value was used.


CENTER command overrides previous

A second CENTER command was encountered. Although this is not an error, any previous CENTER command is overridden.

A global CENTER command is always used for player #1. Although each player must have his own center of view, you are allowed to put the CENTER command for player one outside the PLAYER block.

Personal tools