PDA

View Full Version : No matching signatures to RandomFloat(float, float)



_RC
08-05-2016, 02:16 PM
In the documentation i have found this and wanted to use it:


float RandomFloat(float low, float high)
Returns a random float between low and high

What i did:



float randomLow = 0.0;
float randomHigh = 100.0;
randomResult = RandomFloat(randomLow, randomHigh);

What it tells me:


No matching signatures to 'RandomFloat(float, float)


So whats the problem? I dont get it ..

Maestro FĂ©nix
08-05-2016, 02:18 PM
randomResult = Math.RandomFloat(randomLow, randomHigh);

Nero
08-05-2016, 03:54 PM
Aye, use Math. for math related functions.
These things should be clarified in the docs.
g_EngineFuncs, g_EntityFuncs, etc...
:3

_RC
08-05-2016, 04:30 PM
Thank you very much!
A line of example for each entry in the documentation would be really useful.

Nero
08-05-2016, 05:51 PM
Indeed!
Most of the time you can find examples in the existing scripts, but sometimes something has never been used.