MYSQL query erorr. -
Yves - 26.05.2014
am trying to fix this and i just cannot fix it.
Код:
error 017: undefined symbol "query"
Код:
timer LoadingScreenTimer[100](playerid)
{
LoadingPercentage[playerid] ++;
format(string, sizeof(string), "%d%%~n~~w~Loading...", LoadingPercentage[playerid]);
TextDrawSetString(RegisterLoginTD[playerid][5], string);
if(LoadingPercentage[playerid] == 100)
{
SendClientMessage(playerid, COLOR_YELLOW, "Use keys up-down and right-left and when you select action press F!");
format(string, sizeof(string), "Welcome %s~n~~n~Please type your password!", GetName(playerid));
TextDrawSetString(RegisterLoginTD[playerid][0], string);
LoadingPercentage[playerid] = 0;
TextDrawHideForPlayer(playerid, RegisterLoginTD[playerid][5]);
mysql_format(1, Query, "SELECT * FROM `test_table` WHERE `Name` = '%e'", GetName(playerid));
mysql_function_query( connectionHandle, query[], bool:cache, callback[], format[], {Float,_}:... ) // <-- this is showing the error query.
mysql_store_result();
SelectedCharacter[playerid] = 0;
if(mysql_num_rows() == 1)
{
SendClientMessage(playerid, COLOR_LIME, "You are registered, please type your password!");
CPLK[playerid] = repeat CheckPlayerLoginKeys(playerid);
TextDrawSetString(RegisterLoginTD[playerid][2], "LOGIN DELETE");
}
else
{
SendClientMessage(playerid, COLOR_LIME, "You are not registered, please type your new password!");
CPRK[playerid] = repeat CheckPlayerRegisterKeys(playerid);
TextDrawSetString(RegisterLoginTD[playerid][2], "REGISTER DELETE");
}
TextDrawSetString(RegisterLoginTD[playerid][1], "~b~~h~A ~w~B C D E F G H I J K L M N O P R S~n~T U V Z Q W Y X 0 1 2 3 4 5 6 7 8 9");
for(new td = 0; td <= 2; td++) { TextDrawShowForPlayer(playerid, RegisterLoginTD[playerid][td]); }
TextDrawShowForPlayer(playerid, RegisterLoginTD2[0]);
TextDrawShowForPlayer(playerid, RegisterLoginTD2[1]);
TextDrawShowForPlayer(playerid, RegisterLoginTD2[2]);
stop LST[playerid];
}
mysql_free_result();
return 1;
}
Re: MYSQL query erorr. -
rappy93 - 26.05.2014
You have to define the query variable first. In your case,put this :
Somewhere above the mysql_function_querry function. It should work.
Re: MYSQL query erorr. -
Yves - 26.05.2014
nope it showing this now
error 029: invalid expression, assumed zero
i added new query[128]; so it connects to
mysql_function_query( connectionHandle, query[], bool:cache, callback[], format[], {Float,_}:... )
i did change query to Query and still same happens.
Re: MYSQL query erorr. -
rappy93 - 26.05.2014
Show me the line with this error.
Re: MYSQL query erorr. -
Yves - 26.05.2014
this is the line error
mysql_function_query( connectionHandle, query[], bool:cache, callback[], format[], {Float,_}:... )
Re: MYSQL query erorr. -
rappy93 - 26.05.2014
Well,the problem is you didn't fill in any of the parameters in that function. For example , this is what it looks in my script.
pawn Код:
mysql_function_query(dbHandle, query, false, "", "");
That dbHandle is my connection to the database(username,password etc.)
The query is the "new query" thingie you defined. False is the cache and the others are optional so I just ignored them in this case.