AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Function _get_user_point(id) should return a value? (https://forums.alliedmods.net/showthread.php?t=216540)

Kz1.0 05-22-2013 12:36

Function _get_user_point(id) should return a value?
 
I make a native to get some value through another plugin. But the compiler return a warning, how to fix it ? :crab:

PHP Code:

public _get_user_point(id)
{
    if (!(
is_user_connected(id)))
        return 
0
        
    
else
        return 
points[id]



Bos93 05-22-2013 13:26

Re: Function _get_user_point(id) should return a value?
 
PHP Code:

public _get_user_point(id

    if (!
is_user_connected(id)) 
        return -

         
    
    
return points[id



Kz1.0 05-22-2013 14:42

Re: Function _get_user_point(id) should return a value?
 
ty! and 1 more question, why the get_players with "ae" flag didn't correct ?

Here is my code:

PHP Code:

    new playersct[32], numct
    get_players
(playersctnumct"ae""CT")
    
    for (new 
i=1i<=numcti++)
    {
            
points[i]++
                        
//
    


And it always add point to both alive players, whatever team he is :(. I have searched and used ConnorMcLeod fix too, but it still doesn't work.


All times are GMT -4. The time now is 16:23.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.