warning 202: number of arguments does not match definition
#1

What is wrong with this?

pawn Код:
ShowPlayerDialog( playerid, BUYTOYS, DIALOG_STYLE_MSGBOX, "Toy Accessories", ""COL_WHITE"Welcome to "COL_LIGHTBLUE"%s"COL_WHITE". You can buy accessories here.\n\nClick continue to see our range.",BizzInfo[HouseEntered[playerid]][bMessage],"Continue", "Cancel" );
Reply
#2

ShowPlayerDialog does not accepting arguments to format the text. So format a string and use that as "info".
Reply
#3

Oooh yea ofcourse.. "faceplam"

so this one would work?
pawn Код:
new string[128], titlestring[128];
        format(string,sizeof(string),""COL_WHITE"Welcome to "COL_LIGHTBLUE"%s"COL_WHITE". You can buy accessories here.\n\nClick continue to see our range.",BizzInfo[HouseEntered[playerid]][bMessage]);
        format(titlestring,sizeof(titlestring),"Toy Accessories");
        ShowPlayerDialog(playerid,BUYTOYS,DIALOG_STYLE_MSGBOX,titlestring,string,"Continue","Cancel");
Reply
#4

You don't need to make a format for the title, since you didn't make any string in it just put it in the title.
PHP код:
        new string[128];
        
format(string,sizeof(string),""COL_WHITE"Welcome to "COL_LIGHTBLUE"%s"COL_WHITE". You can buy accessories here.\n\nClick continue to see our range.",BizzInfo[HouseEntered[playerid]][bMessage]);
        
ShowPlayerDialog(playerid,BUYTOYS,DIALOG_STYLE_MSGBOX,"Toy Accessories",string,"Continue","Cancel"); 
Reply
#5

Oh, thank you
Reply
#6

For some reason it just says "server unknown command"

pawn Код:
if (strcmp("/buytoys", cmdtext, true, 10) == 0)
    {
        if(!IsAtClothesShop(playerid))
        {
            SendClientMessage(playerid, COLOR_GREY, "You are not in a clothes shop.");
            return 1;
        }
        format(string,sizeof(string),""COL_WHITE"Welcome to "COL_LIGHTBLUE"%s"COL_WHITE". You can buy accessories here.\n\nClick continue to see our range.",BizzInfo[HouseEntered[playerid]][bMessage]);
        ShowPlayerDialog(playerid,BUYTOYS,DIALOG_STYLE_MSGBOX,"Toy Accessories",string,"Continue","Cancel");
        return 1;
    }
Reply
#7

BizzInfo[HouseEntered[playerid]][bMessage]

The value of HouseEntered[playerid] is out of bounds. You need to make sure that a player HAS entered (set to an appropriate value) a house before formatting.
Reply
#8

its fixed now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)