OpenTTD GameScript API 20260206-master-g4d4e37dbf1
GSAdmin Class Reference

Class that handles communication with the AdminPort. More...

#include <script_admin.hpp>

Inheritance diagram for GSAdmin:

Static Public Member Functions

static bool Send (table data)
 Send information to the AdminPort.

Detailed Description

Class that handles communication with the AdminPort.

Member Function Documentation

◆ Send()

bool GSAdmin::Send ( table data)
static

Send information to the AdminPort.

The information can be anything as long as it isn't a class or instance thereof.

Parameters
dataThe information to send, in a table. For example: { param = "param" }.
Returns
True if and only if the data was successfully converted to JSON and send to the AdminPort.
Note
If the resulting JSON of your table is larger than 1450 bytes, nothing will be sent (and false will be returned).