ezeio2:scriptref:setfield

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:setfield [2019-09-02 21:40] andrehezeio2:scriptref:setfield [2020-09-16 23:15] (current) andreh
Line 1: Line 1:
-==== SetField ====+==== SetField/SetFieldFloat ====
  
 Set the value of a field Set the value of a field
Line 6: Line 6:
  
 <code>SetField( fieldno, value )</code> <code>SetField( fieldno, value )</code>
 +<code>SetFieldFloat( fieldno, Float:value )</code>
  
-Set the integer value of a field and flag the value as changed.+Set the integer or float value of a field and flag the value as changed.
  
 Note that the Math logic for the field is continuously evaluated, so if the math logic results in a different value, it will immediately overwrite the value set by this command. To only set the field from script logic, leave the Math blank.  Note that the Math logic for the field is continuously evaluated, so if the math logic results in a different value, it will immediately overwrite the value set by this command. To only set the field from script logic, leave the Math blank. 
Line 14: Line 15:
  
 | ''fieldno'' | Which field to fetch | | ''fieldno'' | Which field to fetch |
-| ''value'' | Value to set the field to (integer) |+| ''value'' | Value to set the field to (integer for SetField, Float for SetFieldFloat) |
  
 === Return value === === Return value ===
Line 28: Line 29:
        
    // Field 4 is set to the value 123.    // Field 4 is set to the value 123.
 +   
 +   SetFieldFloat(4, 123.45);
 +   
 +   // Field 4 is set to the value 123.45.
 +   
 </code> </code>
  
  
  • ezeio2/scriptref/setfield.1567460459.txt.gz
  • Last modified: 2019-09-02 21:40
  • by andreh