LumpReadString: Difference between revisions
m (Fix return type) |
(Update specifications on failure) Tag: Source edit |
||
Line 16: | Line 16: | ||
Note the string returned might have a shorter length than what is specified by the ''length'' parameter, should the end of the file be reached. | Note the string returned might have a shorter length than what is specified by the ''length'' parameter, should the end of the file be reached. | ||
The function returns an empty string when called on a lump that was not opened with <tt>[[LumpOpen]]</tt>, alongside a console message. | |||
==Examples== | ==Examples== |
Revision as of 08:24, 4 January 2024
This article documents a Zandronum-specific ACS feature which may not be supported by ZDoom and its other child ports. |
This article documents an ACS function which is only available in development builds of Zandronum 3.2 and newer. |
str LumpReadString (int lump, int pos [, int length]) (development version 3.2-alpha and above only)
Usage
Reads a string from a lump, stopping upon encountering a null terminator or the end of the lump.
Parameters
- lump: The lump index as returned from LumpOpen.
- pos: The byte position in the lump to start reading the string from.
- length: The maximum number of characters to read.
Return value
Returns the string that was read.
Note the string returned might have a shorter length than what is specified by the length parameter, should the end of the file be reached.
The function returns an empty string when called on a lump that was not opened with LumpOpen, alongside a console message.
Examples
This article lists no examples, please add one. |