Discuss this page on this page's [[shpGetDataField Talk Page|Talk Page]]
**DEPRECATED**: Use [[modding:function:typGetDataField|typGetDataField]] instead
=== shpGetDataField ===
See [[http://xelerus.de/index.php?s=functions&function=306|shpGetDataField at Xelerus]]
^ Syntax | (shpGetDataField number string) |
^ Arguments | number: the space object or the shipclass UNID of the ship you want data from. |
^ | string: the name of the data field of the ship. |
^ Returns | expression: returns the value or the string of the data field. If there is no value, nothing is returned, not even Nil |
^ Category | [[0.99 functions|0.99]], [[ship functions|ship]], [[unid functions|UNID]] |
^ Description | This function retrieves some base data from a ship. It can access some of the values from the ship class's xml, and some other values. (see below). |
=== Example ===
(shpGetDataField (shpGetClass gPlayership) "score")
Returns 105 for the Freighter.
(shpGetDataField gPlayerShip "level")
Returns 2 for the Sapphire.
Return to [[:Functions]] list