Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

sstring

CryoEagle edited this page Dec 26, 2018 · 5 revisions

sstring

Turns a real number into a string.

Syntax:

sstring(n)
Argument Description
object n The variable to transform into a string

Returns: string

Description:

This function tries to change any object to a string. If object t is of a primitive type such as number then this will work out of the box. Should the input type be more complex eg. List<string> then the type will be returned as a string.

Example:

draw_text(16, 16, "Enemies left: " + sstring(instance_number(obj_enemy)));

This code will draw in the top left corner how many enemies are left after an entrance phase of "Enemies left: ". This is very useful for displaying data on the screen such as FPS, instances in a room, coordinates, etc.

Back to strings

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /