I want to modify the function "getitemname" for first check the name in the database as my script:
example:
function script getitemname {
set @querysql, query_sql("select name_japanese from `ragdb`.`item_db` WHERE `id` ="+getarg(0)+" ORDER BY id ASC LIMIT 0,1", $@itemname$);
if(@querysql == 0) {set $@itemname$, getitemname(getarg(0));}
return;
}
//$@itemname$ = Item name
/*==========================================
* Get the item name by item_id or null
*------------------------------------------*/
BUILDIN(getitemname)
{
int item_id=0;
struct item_data *i_data;
char *item_name;
struct script_data *data;
Question
lipitb
Edited by Patskie
Change to code
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.