28.04.2011, 12:49
(
Последний раз редактировалось KoczkaHUN; 28.04.2011 в 13:00.
Причина: solved by myself
)
Код:
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); }
Solved by removing "const" from name, because DB_Escape() wasn't expected const file type *lol*