#1

Hi,

I want to ask, i have like that:

Код:
new ALLPLAYERS = ReturnUserCount( );
Код:
stock ReturnUserCount()
{
	mysql_free_result( );
    mysql_query("SELECT Vardas FROM players");
    mysql_store_result();
    new users = mysql_num_rows();
    mysql_free_result();
    return users;
}
When i use this in my code, like in command

new ALLPLAYERS = ReturnUserCount( );

Does, returnusercount will be called, or i have to use ALLPLAYERS in anywhere, then all scripts in that stock will be called?
Reply
#2

you cant do that, it will probably crash!
you need to define the sizeof it as it has to hold a string also you need to use it under On-Gm/Fs-Init
to have the effect you want!
Reply
#3

Look into the COUNT MySQL query.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)