Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
ezeio2:scriptref:getfield [2019-09-02 21:38] – andreh | ezeio2:scriptref:getfield [2020-09-16 23:17] (current) – andreh | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== GetField ==== | + | ==== GetField/ |
Get the value of a field | Get the value of a field | ||
Line 6: | Line 6: | ||
< | < | ||
+ | < | ||
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. | ||
</ | </ | ||