Alright there again. Hello.
I'm currently converting over Harbu's RP plugins to 1.7, and it's been a success so far, there is only one problem.
Code:
new query[256], npc_origin[3], npcid, hardcode
format(query,255,"SELECT npcid,x,y,z,hardcode FROM npc")
result = dbi_query(dbc,"%s",query)
if(result >= RESULT_OK)
{
new rows = dbi_num_rows(result)
for( new i = 0; i < rows; i++)
{
dbi_nextrow(result)
npcid = dbi_field(result,1)
npc_origin[0] = dbi_field(result,2)
npc_origin[1] = dbi_field(result,3)
npc_origin[2] = dbi_field(result,4)
hardcode = dbi_field(result,5)
if(get_distance(origin,npc_origin) <= 25.0)
{
if(hardcode == 1)
{
Bank_Npc(id)
break
} else if(hardcode == 2)
{
prodigy(id)
break
} else if(hardcode == 0)
{
shop_options(id,npcid)
break
}
}
}
dbi_free_result(result)
}
That returns an error on the free_result after I use the /buy command at a counter.
Any particular reason you can spot out why that would occur?
Thanks.
__________________