[Include] Simple Mathematics
#5

Quote:
Originally Posted by cessil
Посмотреть сообщение
there's quite a few pointless ones, like Math.Add
also there's functions that won't work like

pawn Код:
stock Math.RandomPlayer( ) // Correct
{
        new
                pCount,
                val
        ;
        for(new i, g = GetMaxPlayers(); i < g; i++)
        {
                if(IsPlayerConnected(i)) pCount++;
        }
        val = random(pCount);
        return val;
}
it could return a non connected player

also this will return -.99 to -.01 as a positive
pawn Код:
stock bool: Math.IsPositive( Float: num ) // Correct
{
        if( num > -1 ) return true;
        return false;
}
and Math.Highest(...) won't work if you use all negative numbers
and you use RandomEx in the script but it should be Math.RandomEx

that's all just by looking over it
Thanks for that, I completely forgot while I was writing this function however they should be fixed. I'm currently at my cousins house and he doesn't have SA-MP nor the compiler and dial-up lawl. I've fixed it in notepad but not 100% correct if it'll work.

Updated :P
Reply


Messages In This Thread
Simple Mathematics - by Lorenc_ - 17.09.2011, 04:06
Re: Math Include - by [O.z]Caroline - 17.09.2011, 04:19
Respuesta: Math Include - by Manuel7284 - 17.09.2011, 04:36
Re: Math Include - by cessil - 17.09.2011, 05:40
Re: Math Include - by Lorenc_ - 17.09.2011, 05:55
Re: Math Include - by bhaveshnande - 17.09.2011, 06:11
Re: Math Include - by [MWR]Blood - 17.09.2011, 06:47
Re: Math Include - by System64 - 17.09.2011, 06:58
Re: Math Include - by MicroD - 17.09.2011, 07:13
Re: Math Include - by CaHbKo - 17.09.2011, 07:14
Re: Math Include - by GangsTa_ - 17.09.2011, 07:20
Re: Math Include - by iPLEOMAX - 17.09.2011, 07:24
Re: Math Include - by Hiddos - 17.09.2011, 07:48
Re: Math Include - by wups - 17.09.2011, 08:14
Re: Math Include - by Lorenc_ - 17.09.2011, 08:37
Re: Math Include - by Raimis_R - 17.09.2011, 08:39
Re: Math Include - by =WoR=Varth - 17.09.2011, 08:40
Re: Math Include - by Double-O-Seven - 17.09.2011, 08:41
Re: Math Include - by Lorenc_ - 17.09.2011, 08:48
Re: Math Include - by Double-O-Seven - 17.09.2011, 08:53
Re: Math Include - by Lorenc_ - 17.09.2011, 08:54
Reply To: Math Include - by Sasino97 - 17.09.2011, 14:31
Re: Simple Mathematics - by GangsTa_ - 23.09.2011, 18:19
Re: Simple Mathematics - by Double-O-Seven - 23.09.2011, 18:21
Re: Simple Mathematics - by juraska - 23.09.2011, 18:43
Re: Simple Mathematics - by AndreT - 29.09.2011, 18:47
Re: Simple Mathematics - by AndreT - 29.09.2011, 19:02
Re: Simple Mathematics - by rbN. - 29.09.2011, 19:09

Forum Jump:


Users browsing this thread: 3 Guest(s)