number of arguments does not match definition
#1

Quote:

format(diagText, sizeof(diagText), "You're banned. \n\n[C40042]Reason:[FFFFFF]%s\n\n[C40042]Banned by:[FFFFFF]%s", bReason, bBannedBy);
ShowPlayerDialog(playerid, DIALOG_BAN, DIALOG_STYLE_MSGBOX, "Banned", diagText, "QU" "IT");
Quote:
DisableInteriorEnterExits(0);
Also, I have alot of errors saying this:
error 017: undefined symbol "mysql_fetch_field_row"
I have #include <mysql> so I don't understand what's wrong.
Reply
#2

pawn Код:
"QU" "IT"
You forgot a comma between them.

pawn Код:
ShowPlayerDialog(playerid, DIALOG_BAN, DIALOG_STYLE_MSGBOX, "Banned", diagText, "QU", "IT");
And
pawn Код:
DisableInteriorEnterExits();
This function doesn't have parameters.
Reply
#3

You missed the , between "QU" and "IT"
pawn Код:
ShowPlayerDialog(playerid, DIALOG_BAN, DIALOG_STYLE_MSGBOX, "Banned", diagText, "QU" ,"IT");
Replace
pawn Код:
DisableInteriorEnterExits(0);
With
pawn Код:
DisableInteriorEnterExits();
EDIT:Too late.
Reply
#4

That's fixed, but what about the mysql_fetch_field_row?
EDIT: I probably solved it... I'll edit this with response.
Reply
#5

If you're using BlueG's MySQL plugin, then it's:
pawn Код:
#include <a_mysql>
And make sure this function exists. I'm not sure if it exists to the latest versions because a lot of things have been changed.
Reply
#6

Quote:
Originally Posted by _Zeus
Посмотреть сообщение
If you're using BlueG's MySQL plugin, then it's:
pawn Код:
#include <a_mysql>
And make sure this function exists. I'm not sure if it exists to the latest versions because a lot of things have been changed.
Using StrickenKid's.
I have these in .inc:
Quote:

native mysql_fetch_field(const fieldname[], dest[], MySQL:handle = (MySQL:0));
native mysql_fetch_field_num(fieldnum, dest[], MySQL:handle = (MySQL:0));
native mysql_fetch_row(dest[], const splitter[] = "|", MySQL:handle = (MySQL:0));
native mysql_fetch_row_data(MySQL:handle = (MySQL:0));

Which one fits it?
pawn Код:
mysql_fetch_field_row(pStats[playerid][Username], "Username");
mysql_fetch_field_row(query, "ID"); pStats[playerid][ID] = strval(query);
These are two examples, I'm not sure which one fits, not a MySQL expert.

And another error
Quote:

(501) : error 076: syntax error in the expression, or invalid function call
(501) : error 029: invalid expression, assumed zero
(501 -- 502) : warning 215: expression has no effect
(502) : error 001: expected token: ";", but found "return"
(502) : fatal error 107: too many error messages on one line

pawn Код:
if(sscanf,params,"us[20]",id,reason))
            return SendClientMessage(playerid, -1, "SYNTAX: /kick [id] [reason]");
Reply
#7

I have never used his plugin; however, this function does not exist. It's probably a macro or custom function by someone. These are his functions: https://sampwiki.blast.hk/wiki/MySQL_Plugin
Reply
#8

I was following an old tutorial.
Does anyone know a up-to-date tutorial?
Reply
#9

Sorry for the bump.
I got another tutorial, but I got this problem, very weird - it claims that 'mysql_fetch_query' is undefined and every other time I use this it is defined, means it's only 'undefined' in that special callback.
pawn Код:
public MySQL_Start(){
    s_MySQL = mysql_connect(MySQL_HOST,MySQL_USER,MySQL_DB,MySQL_PASS);
    if(!s_MySQL)
        return print("Could not connect to database, check the settings again");
    else {
        mysql_function_query(s_MySQL,
            "CREATE TABLE IF NOT EXISTS `accounts` (\
                `id` int(11) NOT NULL, AUTO_INCREMENT,\
                `sUser` varchar(25) NOT NULL, \
                `sPass` varchar(25) NOT NULL, \
                `sSkin` int(11) NOT NULL, \
                `sMoney` int(11) NOT NULL, \
                `sBank` int(11) NOT NULL, \
                `sBanned` int(11) NOT NULL, \
                `sBannedReason` varchar(25) NOT NULL, \
                `sBannedBy` varchar(25) NOT NULL, \
                `sPlayingHours` int(11) NOT NULL, \
                PRIMARY KEY(`id`)\
            )"
,false,"s@MySQL_Start","s","accounts");
    }
    return 1;
}
Reply
#10

I strongly recommend you to switch to another MySQL plugin such as BlueG's or Dan..'s. The plugin you're current using is too old and outdated.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)