Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Plugin] help with mysql plugin error

 
  • 0 Vote(s) - 0 Average
Plugin help with mysql plugin error
Lyonkrs
Offline

Burgershot Member
Posts: 1
Threads: 1
Joined: Oct 2020
Reputation: 0
Location: Indonesia
#1
2021-07-01, 08:45 AM
The error log
Code:
cache_delete: invalid cache id '0'


This is my Pawn Code:
Code:
CMD:actorlist(playerid, params[])
{
new list[1024], skin, Float:AcX, Float:AcY, Float:AcZ, id, Descriptions[48];
new query[1024];
new Cache: actorlist;
mysql_format(SQLHandle, query, sizeof(query), "SELECT * FROM `actor`");
mysql_query(SQLHandle, query);
new rows = cache_num_rows();
if(rows)
{
format(list, sizeof(list), "ID\tSkin\tDescriptions\tDistance\n");
for(new i; i < rows; ++i)
{
cache_get_value_name_int(i, "ID", id);
cache_get_value_name_int(i, "SkinID", skin);
cache_get_value_name_float(i,"X", AcX);
cache_get_value_name_float(i,"Y", AcY);
cache_get_value_name_float(i,"Z", AcZ);
cache_get_value_name(i,"Descriptions", Descriptions);
new Float: distance = GetPlayerDistanceFromPoint(playerid, AcX, AcY, AcZ);
format(list, sizeof(list), "%s%d\t%d\t%s\t%.2f\n", list, id, skin, Descriptions, distance);
}
ShowPlayerDialog(playerid, DIALOG_ACTOR_LIST, DIALOG_STYLE_TABLIST_HEADERS, "Actor List Manager", list, "Manage", "Close");
}
else
{
SendClientMessage(playerid, COLOR_GREY, "ERROR: There's no Actor list on server");
return 1;
}
cache_delete(actorlist);
return 1;
}


The system is works perfectly but why it's giving error?
« Next Oldest | Next Newest »



Messages In This Thread
help with mysql plugin error - by Lyonkrs - 2021-07-01, 08:45 AM
RE: help with mysql plugin error - by Pinch - 2021-07-01, 09:57 AM
RE: help with mysql plugin error - by Kwarde - 2021-07-03, 05:45 AM

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode