Jump to content
  • 0
Hakuryuu

implicit declaration of function ‘itemdb_searchrandomid’

Question

problem:
 
script.c: In function ‘buildin_getstorageitem’:
script.c:17571: warning: implicit declaration of function ‘itemdb_searchrandomid’
 
code:

 

	else {		nameid = script_getnum(st,2);		if ( nameid < 0 )			nameid = itemdb_searchrandomid(-nameid);		if ( nameid <= 0 || !itemdb->exists(nameid) ) {			ShowError("getstorageitem: Non-existant item %d requested.n", nameid);			return 0;		}	} 

 

 
Please help.
Edited by samers

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

What error when you change as per AngelMelody post?

AngelMelody solution is correct , maybe some other line is having error now?

Share this post


Link to post
Share on other sites
  • 0

nameid = itemdb->searchrandomid(-nameid);

 

What error when you change as per AngelMelody post?

AngelMelody solution is correct , maybe some other line is having error now?

 

error: 

 

script.c: In function ‘buildin_getstorageitem’:script.c:17656: warning: passing argument 1 of ‘itemdb->searchrandomid’ makes pointer from integer without a castscript.c:17656: note: expected ‘struct item_group *’ but argument is of type ‘int’ 

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.