[Solved] Need help with my function
#4

Quote:
Originally Posted by The_Tough
Quote:
Originally Posted by Justas [SiJ
Hey,
I have function:
}
[/pawn]
But I get error "error 035: argument type mismatch (argument 2)"
in line:
pawn Код:
dcmd_kick(playerid, params[])
{
    new id, reason[128];
    if (sscanf(params, "us", id, reason)) UsageMsg(playerid, "Usage: /kick <PlayerID/PartOfName> <reason>");
        else if (id == INVALID_PLAYER_ID) ErrorMsg(playerid, "Player not found");
        else
        {
            KickPlayer(playerid,reason); // Try this one
        }
    return 1;
}
Use your brains before you reply... If I'd remove stock KickPlayer
KickPlayer(playerid,reason); wouldn't work..


Quote:
Originally Posted by Swift_
trying to fix this, might help
pawn Код:
stock KickPlayer(playerid, reason[], kickerid[MAX_PLAYER_NAME])
{
  //and do stuff without formating the reason + kickerid, ect.
}
I'll try it now..
EDIT: But kickerid cannot be [MAX_PLAYER_NAME] cause it's only ID of kicker... Am I right?
Thanks for help, it works!
Reply


Messages In This Thread
[Solved] Need help with my function - by SiJ - 18.06.2009, 07:27
Re: Need help with my function - by The_Tough - 18.06.2009, 07:32
Re: Need help with my function - by Grim_ - 18.06.2009, 07:33
Re: Need help with my function - by SiJ - 18.06.2009, 07:45
Re: Need help with my function - by kc - 18.06.2009, 07:49
Re: Need help with my function - by Grim_ - 18.06.2009, 07:49

Forum Jump:


Users browsing this thread: 1 Guest(s)