18.07.2011, 19:44
(
Последний раз редактировалось MdeRooy; 18.07.2011 в 20:23.
)
Thanks! It's working nicely, thanks for pushing me in the right direction!
EDIT: Even though the fix you suggested worked fine, i now run into problems when i DO have more than one variable i want to pass.
As you can see, i want to pass 'inputtext' to the query_array callback. However, this is now giving me the same error as before, but i'm convinced it's in the proper syntax.
I'm more than willing to learn from your helpful advice and great plugin! Thanks already!
EDIT: Even though the fix you suggested worked fine, i now run into problems when i DO have more than one variable i want to pass.
Код:
public Dialog_Login(playerid, inputtext[]) { // --------------------------------------------------------------------------------- // New SQL style login! // --------------------------------------------------------------------------------- new query[128], pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(query, sizeof(query), "SELECT * FROM `users` WHERE `username`='%s'", pname); mysql_query_array(query, MYSQL_LOGIN, {playerid, inputtext}, server);
Код:
tcrpg3.pwn(745) : error 008: must be a constant expression; assumed zero