fn: lua_pushnumber
[contents]

Contents

Syntax

The syntax for lua_pushnumber calls is:

f++:  
lua_pushnumber(number)

n++:  
@lua_pushnumber(number)

Description

The lua_pushnumber function takes a single number parameter and pushes the number on to the Lua stack, it is a binding for this function.

f++ example

Example of lua_pushnumber being used with f++:

lua_pushnumber(14.8)
lua_setglobal("x")
lua
{
	print("x: ", x)
}

n++ example

Example of lua_pushstring being used with n++:

@lua_pushnumber(14.8)
@lua_setglobal("x")
@lua
{
	print("x: ", x)
}

Sponsors