Total Stocks
#1

I've tryed to make a function that can show me all stocks from my script.
pawn Код:
stock TotalStocks( )
{
    new
        StockBuffer[ 32 ],
        StockCount;

    for( new it = 0; it < Scripting_GetPublicsCount( ); it++ )
    {
        Scripting_GetPublic( it, StockBuffer );

        if( !strcmp( StockBuffer, "stock", false, 5 ) )
        {
            StockCount++;
        }
    }

    return StockCount;
}
Dosen't work.
It returns 0.
Reply
#2

stock is not a public function.
Reply
#3

And it can't pe count..right ?
Reply
#4

Not sure if there's another way for stocks but you can use my FileFunctions plugin and loop trough each line (using fileRead) then just check if it has stock in it - simple solution.
Reply
#5

@RyDeR`
Thanks, i will try now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)