Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ezeio2:scriptref:getfield [2019-08-17 18:24] – created andreh | ezeio2:scriptref:getfield [2020-09-16 23:17] (current) – andreh | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Script reference ====== | + | ==== GetField/ |
- | + | ||
- | ==== GetField( fieldno ) ==== | + | |
Get the value of a field | Get the value of a field | ||
Line 8: | Line 6: | ||
< | < | ||
+ | < | ||
Fetches the value of a field | Fetches the value of a field | ||
Line 17: | 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 23: | 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. | ||
</ | </ | ||