website logo
Buy CronusGPC LibraryGamePacks (16bit)YouTubeForumsDiscord
📘Cronus Zen Guide
📗GamePacks (32bit)
📗GPC Script Guide
Navigate through spaces
📘Cronus Zen Guide
📗GamePacks (32bit)
📗GPC Script Guide
⌘K
📑GPC SCRIPTING
What's New in 32bit?
Introduction
Variables
Basic GPC Structure
Definitions
Data Section
Remapping
Const Arrays
Init Section
Main Section
Combo Section
User Created Functions
Identifiers
Flow Control
Constants
Functions
Device Functions
Remapping
Advanced Samples
API Samples
Docs powered by archbee 

Data Section

The data section is located at the first portion of the virtual address space within the GPC bytecode and contains static values which cannot be altered during run time.

The main purpose of the data section is to store static information and its size of it is determined by the values within it. The static values can be accessed in a GPC script through the use of an indexer. You can use definitions in a data section as well if you like as shown in the example below.

GPC
|

Functions

The values placed within the data section are expressed in bytes (8-bit integer). The index is zero-based. As you can see above, the first value is index point 0 (zero) and the 11th value would be index point 10.

You may put in a larger number into the data section as well, however - they will cause the values coming after it to have an index of +1 for 16-bit ranged values and +3 for 32-bit ranged values. A warning will be shown when you do this.

There are multiple functions to retrieve data of different ranges, the below table explains each of the functions - they all have the same syntax:

GPC
|

Function name

Minimum value

Maximum value

Bytes read

dint8

-128

127

1

duint8

0

255

1

dint16

-32 768

32 767

2

duint16

0

65 536

2

dint32

-2 147 483 648

2 147 483 647

4

UP NEXT
Remapping
Docs powered by archbee 
TABLE OF CONTENTS
Functions