ZCMD/SSCANF PROBLEM
#1

So i have this command:

pawn Код:
cmd(wanted, playerid, params[])
{
  if(IsPlayerConnected(playerid) && PlayerLoggedIn[playerid])
  {
    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
    {
      new reason[32];
      new player; new wanted;
      if(sscanf(params, "uds",player,wanted,reason))
      {
        SendClientMessage(playerid, COLOR_HELP, "KORISTENJE: /wanted [ID/PartOfName] [wanted] [reason]");
        return 1;
      }
      if(strlen(reason) > 32) strdel(reason, 32, strlen(reason));
    }
  }
  return 1;
}
And when i type in a reason that's higher than 32 characters it says SERVER: Unkown command, otherwise it's fine.

I put a code underneath that checks is it higher that 32 so it deletes it to be 32 but it didn't help.

Please help, thank you.
Reply


Messages In This Thread
ZCMD/SSCANF PROBLEM - by Zeromanster - 27.02.2010, 23:19
Re: ZCMD/SSCANF PROBLEM - by Nero_3D - 27.02.2010, 23:25
Re: ZCMD/SSCANF PROBLEM - by gotenks918 - 27.02.2010, 23:26

Forum Jump:


Users browsing this thread: 2 Guest(s)