ezeio2:scriptref:getfield

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
ezeio2:scriptref:getfield [2019-09-02 21:38] andrehezeio2:scriptref:getfield [2020-09-16 23:17] (current) andreh
Line 1: Line 1:
-==== GetField ====+==== GetField/GetFieldFloat ====
  
 Get the value of a field Get the value of a field
Line 6: Line 6:
  
 <code>GetField( fieldno )</code> <code>GetField( fieldno )</code>
 +<code>Float:GetFieldFloat( fieldno )</code>
  
 Fetches the value of a field Fetches the value of a field
Line 15: Line 16:
 === Return value === === Return value ===
  
-The value of the field rounded to nearest integer.+The value of the field. GetField will return the value rounded to the nearest integer.
  
 === Example usage === === Example usage ===
Line 21: Line 22:
 <code javascript>     <code javascript>    
    new x;    new x;
 +   new Float:f;
        
    x = GetField(4);    x = GetField(4);
 +   f = GetFieldFloat(4);
        
    // x now holds the value of field 4, rounded to the nearest integer.       // x now holds the value of field 4, rounded to the nearest integer.   
 +   // f holds the value as a float.
 </code> </code>
  
  • ezeio2/scriptref/getfield.1567460301.txt.gz
  • Last modified: 2019-09-02 21:38
  • by andreh