[SOLVED]error 035: argument type mismatch (argument 1)
#1

Код:
forward GetPlayerID(const name[]);
public GetPlayerID(const name[])
{
    new query[128], tmp[128], DBResult:result;
    format(query, sizeof(query), "SELECT id FROM users WHERE nev = '%s'", DB_Escape(name)); // This line is erroneous
    result = db_query(userdb, query);
    db_get_field_assoc(result, "id", tmp, sizeof(tmp));
    db_free_result(result);
    return strval(tmp);
}
What's the problem with it? I use the same syntax for making query everywhere, and I don't understand the problem.

Solved by removing "const" from name, because DB_Escape() wasn't expected const file type *lol*
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)