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

error 035: argument type mismatch (argument 2)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
client21
Senior Member
Join Date: Apr 2013
Old 04-24-2013 , 13:28   error 035: argument type mismatch (argument 2)
Reply With Quote #1

PHP Code:
#pragma semicolon 1

#include <sourcemod>
#include <sdktools>

public OnPluginStart()
{
    
RegConsoleCmd("test"test);
}

public 
Action:test(clientargs)
{
    if (!(
client <= MaxClients))
        return 
Plugin_Handled;

    
decl player_list[MaxClients]; new players 0;
    for (new 
1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && IsPlayerAlive(i)) player_list[players++] = i;
    }
    
Shake_(player_listplayers);

    return 
Plugin_Handled;
}

Shake_(const player_list[], const players)
{
    if (
players 1)
        return;

    new 
Handle:Message StartMessage("Shake"player_listplayers); // error 035: argument type mismatch (argument 2)
    
if (Message != INVALID_HANDLE)
    {
        
// blabla (not important)
    
}

To avoid this error, I must to do this:

PHP Code:
Shake_(const player_list[], const players)
{
    if (
players 1)
        return;

    
decl list[players];
    for (new 
0playersi++)
        list[
i] = player_list[i];

    new 
Handle:Message StartMessage("Shake", list, players);

I do not understand what is wrong in the first variant.
I understand I can do without the function "Shake_"

Last edited by client21; 04-24-2013 at 13:34.
client21 is offline
 


Thread Tools
Display Modes

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 10:44.


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