Hello everyone again! Today I bring a little problem that has been bothering me ... It happens that I have been implementing this code, but when compiling I miss the error C2664 that consists of this 'bool script_rid2sd_(script_state *,map_session_data **,const char *)': argument 2 can not be converted from 'script_state **' to 'map_session_data **'
I will attach the code here, thank you very much for all your help
Question
xSoul
Hello everyone again! Today I bring a little problem that has been bothering me ... It happens that I have been implementing this code, but when compiling I miss the error C2664 that consists of this 'bool script_rid2sd_(script_state *,map_session_data **,const char *)': argument 2 can not be converted from 'script_state **' to 'map_session_data **'
I will attach the code here, thank you very much for all your help
BUILDIN_FUNC(flooritem)
{
struct map_session_data *sd = script_rid2sd(st);
struct item_data *item_data;
int nameid, amount;
if( sd == NULL ) return 0;
nameid = script_getnum(st,2);
if( (item_data = itemdb_search(nameid)) == NULL )
return 0;
amount = script_getnum(st,3);
if( amount <= 0 )
return 0;
map_addflooritem_area(&sd->bl, 0, 0, 0, nameid, amount);
return 0;
}
Link to comment
Share on other sites
9 answers 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.