implicit declaration of function ‘itemdb_searchrandomid’

Hakuryuu

New member
Messages
20
Points
0
Github
samers1
Emulator
problem:
 
script.c: In function ‘buildin_getstorageitem’:
script.c:17571: warning: implicit declaration of function ‘itemdb_searchrandomid’
 
code:
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.
 
Last edited by a moderator:
nameid = itemdb->searchrandomid(-nameid);
did not work.

default_sad.png


 
What error when you change as per AngelMelody post?

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

 
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: 

Code:
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’ 
 
Back
Top