# ai_instance.cpp File Reference

Implementation of AIInstance. More...

`#include "../stdafx.h"`
`#include "../debug.h"`
`#include "../settings_type.h"`
`#include "../vehicle_base.h"`
`#include "../saveload/saveload.h"`
`#include "../gui.h"`
`#include "table/strings.h"`
`#include <squirrel.h>`
`#include "../script/squirrel.hpp"`
`#include "../script/squirrel_helper.hpp"`
`#include "../script/squirrel_class.hpp"`
`#include "../script/squirrel_std.hpp"`
`#include "ai_info.hpp"`
`#include "ai_storage.hpp"`
`#include "ai_instance.hpp"`
`#include "ai_gui.hpp"`
`#include "api/ai_abstractlist.hpp.sq"`
`#include "api/ai_accounting.hpp.sq"`
`#include "api/ai_airport.hpp.sq"`
`#include "api/ai_base.hpp.sq"`
`#include "api/ai_bridge.hpp.sq"`
`#include "api/ai_bridgelist.hpp.sq"`
`#include "api/ai_cargo.hpp.sq"`
`#include "api/ai_cargolist.hpp.sq"`
`#include "api/ai_company.hpp.sq"`
`#include "api/ai_controller.hpp.sq"`
`#include "api/ai_date.hpp.sq"`
`#include "api/ai_depotlist.hpp.sq"`
`#include "api/ai_engine.hpp.sq"`
`#include "api/ai_enginelist.hpp.sq"`
`#include "api/ai_error.hpp.sq"`
`#include "api/ai_event.hpp.sq"`
`#include "api/ai_event_types.hpp.sq"`
`#include "api/ai_execmode.hpp.sq"`
`#include "api/ai_gamesettings.hpp.sq"`
`#include "api/ai_group.hpp.sq"`
`#include "api/ai_grouplist.hpp.sq"`
`#include "api/ai_industry.hpp.sq"`
`#include "api/ai_industrylist.hpp.sq"`
`#include "api/ai_industrytype.hpp.sq"`
`#include "api/ai_industrytypelist.hpp.sq"`
`#include "api/ai_list.hpp.sq"`
`#include "api/ai_log.hpp.sq"`
`#include "api/ai_map.hpp.sq"`
`#include "api/ai_marine.hpp.sq"`
`#include "api/ai_order.hpp.sq"`
`#include "api/ai_rail.hpp.sq"`
`#include "api/ai_railtypelist.hpp.sq"`
`#include "api/ai_road.hpp.sq"`
`#include "api/ai_sign.hpp.sq"`
`#include "api/ai_station.hpp.sq"`
`#include "api/ai_stationlist.hpp.sq"`
`#include "api/ai_subsidy.hpp.sq"`
`#include "api/ai_subsidylist.hpp.sq"`
`#include "api/ai_testmode.hpp.sq"`
`#include "api/ai_tile.hpp.sq"`
`#include "api/ai_tilelist.hpp.sq"`
`#include "api/ai_town.hpp.sq"`
`#include "api/ai_townlist.hpp.sq"`
`#include "api/ai_tunnel.hpp.sq"`
`#include "api/ai_vehicle.hpp.sq"`
`#include "api/ai_vehiclelist.hpp.sq"`
`#include "api/ai_waypoint.hpp.sq"`
`#include "api/ai_waypointlist.hpp.sq"`

Go to the source code of this file.

## Enumerations
enum | SQSaveLoadType { SQSL_INT = 0x00, SQSL_STRING = 0x01, SQSL_ARRAY = 0x02, SQSL_TABLE = 0x03, SQSL_BOOL = 0x04, SQSL_NULL = 0x05, SQSL_ARRAY_TABLE_END = 0xFF }
| The type of the data that follows in the savegame. More...
enum | { AISAVE_MAX_DEPTH = 25 }
## Functions
static void | PrintFunc (bool error_msg, const SQChar *message)
## Variables
static byte | _ai_sl_byte
static const SaveLoad | _ai_byte []

## Detailed Description

Implementation of AIInstance.

Definition in file ai_instance.cpp.

## Enumeration Type Documentation

anonymous enum

Enumerator:

  AISAVE_MAX_DEPTH | The maximum recursive depth for items stored in the savegame.

Definition at line 391 of file ai_instance.cpp.

enum SQSaveLoadType

The type of the data that follows in the savegame.

Enumerator:

  SQSL_INT | The following data is an integer.
  SQSL_STRING | The following data is an string.
  SQSL_ARRAY | The following data is an array.
  SQSL_TABLE | The following data is an table.
  SQSL_BOOL | The following data is a boolean.
  SQSL_NULL | A null variable.
  SQSL_ARRAY_TABLE_END | Marks the end of an array or table, no data follows.

Definition at line 374 of file ai_instance.cpp.

## Variable Documentation

const SaveLoad _ai_byte[]`[static]`

Initial value:

     {
      SLEG_VAR(_ai_sl_byte, SLE_UINT8),

    }

Definition at line 386 of file ai_instance.cpp.