LuaDocs/LuaManager

From Data Realms Wiki

(Difference between revisions)
Jump to: navigation, search
(LuaManager - Automatically generated by LuaBot)
(LuaManager - Automatically generated by LuaBot)
 
Line 11: Line 11:
===TempEntity===
===TempEntity===
A temporary Entity that can be accessed in the Lua state.The temporary entity. Ownership is NOT transferred.
A temporary Entity that can be accessed in the Lua state.The temporary entity. Ownership is NOT transferred.
 +
 +
 +
==Functions==
 +
===FileOpen===
 +
Opens file. You can open files only inside .rte folders of game directory. no more that MAX_OPEN_FILES file simultaneously.
 +
 +
'''Arguments:'''
 +
 +
* Path to file. All paths are made absoulte by adding current working directory path. File mode.
 +
 +
'''Return value:'''
 +
 +
File number.
 +
 +
 +
===FileClose===
 +
Closes a previously opened file.
 +
 +
'''Arguments:'''
 +
 +
* File number.
 +
 +
'''Return value:'''
 +
 +
None.
 +
 +
 +
===FileReadLine===
 +
Reads a line from file.
 +
 +
'''Arguments:'''
 +
 +
* File number.
 +
 +
'''Return value:'''
 +
 +
Line from file, or empty string on error.
 +
 +
 +
===FileWriteLine===
 +
Writes a text line to file.
 +
 +
'''Arguments:'''
 +
 +
* File number.
 +
 +
'''Return value:'''
 +
 +
None.
 +
 +
 +
===FileEOF===
 +
Returns true if end of file was reached
 +
 +
'''Arguments:'''
 +
 +
* File number.
 +
 +
'''Return value:'''
 +
 +
Whether or not EOF was reached.
 +
[[LuaDocs/Index|'''Go back to Class Index''']]
[[LuaDocs/Index|'''Go back to Class Index''']]

Latest revision as of 08:57, 15 May 2014

Contents

Has no parent class

Generic Class. The singleton manager of the master lua script state.

Go back to Class Index


Properties

TempEntity

A temporary Entity that can be accessed in the Lua state.The temporary entity. Ownership is NOT transferred.


Functions

FileOpen

Opens file. You can open files only inside .rte folders of game directory. no more that MAX_OPEN_FILES file simultaneously.

Arguments:

  • Path to file. All paths are made absoulte by adding current working directory path. File mode.

Return value:

File number.


FileClose

Closes a previously opened file.

Arguments:

  • File number.

Return value:

None.


FileReadLine

Reads a line from file.

Arguments:

  • File number.

Return value:

Line from file, or empty string on error.


FileWriteLine

Writes a text line to file.

Arguments:

  • File number.

Return value:

None.


FileEOF

Returns true if end of file was reached

Arguments:

  • File number.

Return value:

Whether or not EOF was reached.


Go back to Class Index

Personal tools