User Tools

Site Tools


foundation-library-functions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
foundation-library-functions [2020/07/14 13:01] maximefoundation-library-functions [2021/12/09 10:45] maxime
Line 55: Line 55:
  
 ''string **foundation.getGameVersion**()'' ''string **foundation.getGameVersion**()''
 +
 +----
 +
 +===== createData =====
 +
 +Creates a new instance of a data type
 +
 +''void **myMod:createData**(//instanceData//)''
 +
 +^ Name ^ Type ^ Description ^
 +| //''instanceData''// | ''table'' or ''nil'' | the data defining the new instance. If not ''nil'', the table must contain at least the instance's type (''DataType'', see [[api|API]] for the complete list) |
 +
 +==== Example ====
 +
 +<code lua>
 +local instanceData = {
 +    DataType = "DATA_TYPE",
 +    ...
 +}
 +myMod:createData(instanceData )
 +</code>
foundation-library-functions.txt · Last modified: 2023/09/14 11:32 by mathieu

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki