Raised This Month: $51 Target: $400
 12% 

argument type mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NagarD
Junior Member
Join Date: Jun 2011
Old 06-10-2014 , 12:32   argument type mismatch
Reply With Quote #1

Hi,
PHP Code:
new g_iPingg_iPlayerManager;

public 
OnPluginStart()
{
    
g_iPing    FindSendPropOffs("CPlayerResource""m_iPing");
    
g_iPlayerManager FindEntityByClassname(MaxClients"cs_player_manager");

    
CreateTimer(4.0TimerSnowPing_TIMER_REPEAT);
}

public 
Action:TimerSnowPing(Handle:timer)
{
    if (
g_iPing != -|| g_iPlayerManager != -1) {
        
        for(new 
1<= MaxClientsi++)
        {
            if(
IsValidEdict(i) || IsClientInGame(i) || IsFakeClient(i))
                
SetEntData(g_iPlayerManagerg_iPing + (4), GetRandomInt(MINPINGMAXPING)); //-----< ERROR
        
}
    }

error 035: argument type mismatch (argument 1)
Why error?
NagarD is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 06-10-2014 , 13:16   Re: argument type mismatch
Reply With Quote #2

Since we don't know what MINPING and MAXPING are...

Edit: apparently for some reason the form submitted when I was in the middle of typing, no idea what happened there. I was going to point out the GetPlayerResourceEntity() function can be used to get the resource entity.

Incidentally, changing player pings in the resource entity has Policy of Truth implications.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 06-10-2014 at 13:19.
Powerlord is offline
NagarD
Junior Member
Join Date: Jun 2011
Old 06-10-2014 , 14:13   Re: argument type mismatch
Reply With Quote #3

Powerlord thanks for post.

My error. I announced define as a string. Thought that error in the first function, and it seemed error was in the second.
NagarD is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:35.


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