27.02.2015, 21:48
(6782
: error 017: undefined symbol "playerid"
(67831) : error 017: undefined symbol "playerid"
67828: GetPlayerName(playerid, name, sizeof (name));
67831: setarg(paramPos, 0, playerid);
From this stock:
http://pastebin.com/TD8GRhBk
Why?
I get this error only if i put this publics:
Sometimes when i get those random errors i find that is from a { or } but this time the number of { and } are equal.
: error 017: undefined symbol "playerid"(67831) : error 017: undefined symbol "playerid"
67828: GetPlayerName(playerid, name, sizeof (name));
67831: setarg(paramPos, 0, playerid);
From this stock:
http://pastebin.com/TD8GRhBk
Why?
I get this error only if i put this publics:
Код:
public MySQLLoadCars(sqlplayerid, sqlvalname[], sqlresult[])
{
new query[128];
format(query, sizeof(query), "SELECT %s FROM cars WHERE id = %d LIMIT 1", sqlvalname, sqlplayerid);
mysql_query(query);
mysql_store_result();
if(mysql_fetch_row(sqlresult)==1)
{
return 1;
}
return 0;
}
public LoadCar()
{
new Query[255];
mysql_query("SELECT * FROM cars"); // Querys the "Query" Variable.
mysql_store_result(); // Stores the result from Query
personalcars = mysql_num_rows();
new masini=0;
for(new idx = 1; idx <= personalcars; idx++)
{
format(Query, sizeof(Query), "SELECT * FROM cars WHERE id = '%d'", idx);
mysql_query(Query); // Querys the "Query" Variable.
mysql_store_result(); // Stores the result from Query
if(mysql_num_rows()) // Checks if theres anyrow.
if(mysql_fetch_row_format(Query,"|")) // Splits the row
{
sscanf(Query, "p<|>e<iiffffffffiis[64]s[64]iiiiis[255]iiiiiiiiiiiiiii>",CarData[idx]);
masini++;
}
//printf("id %d car model %d, cLocationx %f, cNum %s, cSaAngle %f, cComponent13 %d",idx, CarData[idx][cModel],CarData[idx][cLocationx],CarData[idx][cNum],CarData[idx][cSaAngle], CarData[idx][cComponent01]);
}
printf("-Masini citite: %d", masini);
return 1;
}

