fn: lua_pushstring
[contents]

Contents

Syntax

The syntax for lua_pushstring calls is:

f++:  
lua_pushstring(string)

n++:  
@lua_pushstring(string)

Description

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

f++ example

Example of lua_pushstring being used with f++:

  1. lua_pushstring("hello, world!")
  2. lua_setglobal("str")
  3. lua
  4. {
  5. print(str)
  6. }

n++ example

Example of lua_pushstring being used with n++:

  1. @lua_pushstring("hello, world!")
  2. @lua_setglobal("str")
  3. @lua
  4. {
  5. print(str)
  6. }