Market problem [argument type mismatch]
#1

So, here I am trying to create a market. People should be able to create a market by typing a CMD, it would then insert the info into MySQL and load through MySQL. However I keep getting errors when making the test cmd to check if its working. Here's the code:


The admin test CMD to create the market:
pawn Код:
CMD:createibay(playerid, params[])
{
    static
        id = -1,
        headline[32],
        message[230];

    if (PlayerData[playerid][pAdmin] < 5 && !PlayerData[playerid][pFactionMod])
        return SendErrorMessage(playerid, "You don't have permission to use this command.");

    if (sscanf(params, "ds[32]", headline, message))
    {
        SendSyntaxMessage(playerid, "/createibay [headline] [message]");
        return 1;
    }

    id = IBay_Create(playerid, headline, message);   //Line 32927

    if (id == -1)
        return SendErrorMessage(playerid, "The server has reached the limit for IBay markets.");

    SendServerMessage(playerid, "You have successfully created IBay ID: %d.", id);
    return 1;
}
The IBay_Create
pawn Код:
IBay_Create(playerid, headline, message)
{
    {
        for (new i = 0; i != MAX_IBAY; i ++)
        {
            if (!IBayData[i][ibExists])
            {
                IBayData[i][ibExists] = true;
                IBayData[i][ibOwner] = 1;

                format(IBayData[i][ibHeadline], 32, headline);  //Line 8470
                format(IBayData[i][ibMessage], 230, message);    //Line 8471

                IBay_Save(i);
                mysql_function_query(g_iHandle, "INSERT INTO `ibay` (`ibOwner`) VALUES(1)", false, "OnIBayCreated", "d", i);
                return i;
            }
        }
    }
    return -1;
}
The errors:
pawn Код:
C:\Users\Test\Desktop\roleplay.pwn(8470) : error 035: argument type mismatch (argument 3)
C:\Users\Test\Desktop\roleplay.pwn(8471) : error 035: argument type mismatch (argument 3)
C:\Users\Test\Desktop\roleplay.pwn(8460) : warning 203: symbol is never used: "message"
C:\Users\Test\Desktop\roleplay.pwn(8460) : warning 203: symbol is never used: "headline"
C:\Users\Test\Desktop\roleplay.pwn(8460) : warning 203: symbol is never used: "playerid"
C:\Users\Test\Desktop\roleplay.pwn(32927) : error 035: argument type mismatch (argument 2)
Reply


Messages In This Thread
Market problem [argument type mismatch] - by Zens - 27.07.2015, 21:07
Re: Market problem [argument type mismatch] - by Roberto80 - 27.07.2015, 21:14
Re : Market problem [argument type mismatch] - by Dutheil - 27.07.2015, 21:15
Re: Market problem [argument type mismatch] - by Zens - 27.07.2015, 21:17
AW: Market problem [argument type mismatch] - by Mencent - 27.07.2015, 21:29
Re: AW: Market problem [argument type mismatch] - by Zens - 27.07.2015, 21:31

Forum Jump:


Users browsing this thread: 2 Guest(s)