Dialog skin changer
#1

Hello,
I use one dialog to change skins and i get two errors:

Код:
C:\Users\User\Desktop\Drift\Drift\gamemodes\Drift.pwn(2634) : error 035: argument type mismatch (argument 1)
C:\Users\User\Desktop\Drift\Drift\gamemodes\Drift.pwn(2636) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
I use input text like this:

pawn Код:
ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Change your skin","Enter your model/skin id below:","Change","Close");
Lines of errors is here:

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 3)
    {
      if(response)
      {
            if(!IsInvalidSkin(inputtext))// error 1 is here.
            {
                SetPlayerSkin(playerid, inputtext);// error 2 is here.
                SendClientMessage(playerid,COLOR_GREEN,"You change your skin");
                new skinmenu[] = "Check my skin\nChange skin\n";
                ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"My Skin, Here you can change your skin.",skinmenu,"Use","Close");
                return 1;
            }
            else
            {
              SendClientMessage(playerid,COLOR_RED,"This is invalid skin");
              new skinmenu[] = "Check my skin\nChange skin\n";
                ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"My Skin, Here you can change your skin.",skinmenu,"Use","Close");
              return 1;
            }
        }
        return 1;
    }
This is about IsInvalidSkin

pawn Код:
IsInvalidSkin(skinid)
{  // Created by Simon
    // Checks whether the skinid parsed is crashable or not.
    #define MAX_BAD_SKINS  14
    new badSkins[MAX_BAD_SKINS] = {3, 4, 5, 6, 8, 42, 65, 74, 86, 119, 149, 208, 273, 289};
    for (new i = 0; i < MAX_BAD_SKINS; i++)
        {
        if (skinid == badSkins[i]) return true;
    }
    return false;
}
Can any one help me to remove that problem....
Reply


Messages In This Thread
Dialog skin changer - by gecatahh - 25.04.2010, 10:34
Re: Dialog skin changer - by Hiddos - 25.04.2010, 10:38
Re: Dialog skin changer - by gecatahh - 25.04.2010, 10:46

Forum Jump:


Users browsing this thread: 1 Guest(s)