clif.cpp:25552:25: error: invalid use of ‘const_cast’ with type ‘int’, which is not a pointer, reference, nor a pointer-to-data-member type
25552 | p->expireTime = const_cast<int>((st->expire_time - time(NULL)) * 1000); //if 0 == unlimited on client..
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
clif.cpp:25567:78: error: invalid initialization of non-const reference of type ‘item&’ from an rvalue of type ‘item*’
25567 | clif_add_random_options( p->items[slot].option_data, &st->items_inventory[i] );
| ^~~~~~~~~~~~~~~~~~~~~~~
clif.cpp:2794:93: note: in passing argument 2 of ‘void clif_add_random_options(ItemOptions*, item&)’
2794 | static void clif_add_random_options( struct ItemOptions buf[MAX_ITEM_RDM_OPT], struct item& it ){
Question
darksam
Does anyone know how to fix the 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.