Skip to reading
PCA Script Programming

str() and aliases

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page
On this page
Code example
str(value)

Convert a value to its display text.

Returns: Text.

Aliases: string(), text()

Code example
str(25)

This is a conversion, not a translation lookup or automatic GUI wildcard expansion.

number() and aliases#

Code example
number(value)

Convert to a floating-point number.

Returns: Number.

Aliases: float()

Code example
number("2.5")

Validate player-entered numeric text first if malformed input must be rejected.

integer() and aliases#

Code example
integer(value)

Convert to a whole integer. Fractional parts are discarded toward zero.

Returns: Integer.

Aliases: int()

Code example
integer(3.8)
Page 52 of 357Permalink
Go to page