apuadofrancisco
New member
2>..srcmapitemdb.c(948): warning C4013: 'parse_script' undefined; assuming extern returning int
2>..srcmapitemdb.c(948): warning C4047: '=' : 'script_code *' differs in levels of indirection from 'int'
2>..srcmapstatus.c(2245): warning C4047: 'function' : 'int64' differs in levels of indirection from 'char [12]'
4> core.c
2>..srcmapstatus.c(2245): warning C4024: 'function through pointer' : different types for formal and actual parameter 2
2>..srcmapstatus.c(2245): warning C4047: 'function' : 'int64' differs in levels of indirection from 'char [12]'
2>..srcmapstatus.c(2245): warning C4024: 'function through pointer' : different types for formal and actual parameter 2
2>..srcmapstatus.c(2246): warning C4013: 'run_script' undefined; assuming extern returning int
2>..srcmapstatus.c(2246): warning C4047: 'function' : 'int64' differs in levels of indirection from 'char [12]'
2>..srcmapstatus.c(2246): warning C4024: 'function through pointer' : different types for formal and actual parameter 2
The red lines are the one stated in warning compilation...
Thank you
2>..srcmapitemdb.c(948): warning C4047: '=' : 'script_code *' differs in levels of indirection from 'int'
and this....static int itemdb_readbonus(void)
{
char* filename = "extra_bonuses.txt";
uint32 lines = 0, count = 1;
char line[1024], path[256];
FILE* fp;
sprintf(path, "%s/%s", map->db_path, filename);
fp = fopen(path, "r");
if( fp == NULL )
{
ShowWarning("itemdb_readbonus: File not found "%s", skipping.n", path);
return 0;
}
while(fgets(line, sizeof(line), fp))
{
char *str, *p;
lines++;
if(line[0] == '/' && line[1] == '/')
continue;
str = "0";
p = line;
while( ISSPACE(*p) )
++p;
if( *p == '0' )
continue;
if( *p != '{' )
{
ShowError("itemdb_readbonus: Invalid format in line %d of "%s", skipping.n", lines, path);
continue;
}
str = p;
p = strstr(p+1,"}");
if ( strchr(p,',') != NULL )
{
ShowError("itemdb_readbonus: Extra columns in line %d of "%s", skipping.n", lines, path);
continue;
}
extra_bonus[count].script = parse_script(str, path, lines, 0);
count++;
}
fclose(fp);
ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.n", count-1, filename);
return 0;
}
2>..srcmapstatus.c(2245): warning C4047: 'function' : 'int64' differs in levels of indirection from 'char [12]'
4> core.c
2>..srcmapstatus.c(2245): warning C4024: 'function through pointer' : different types for formal and actual parameter 2
2>..srcmapstatus.c(2245): warning C4047: 'function' : 'int64' differs in levels of indirection from 'char [12]'
2>..srcmapstatus.c(2245): warning C4024: 'function through pointer' : different types for formal and actual parameter 2
2>..srcmapstatus.c(2246): warning C4013: 'run_script' undefined; assuming extern returning int
2>..srcmapstatus.c(2246): warning C4047: 'function' : 'int64' differs in levels of indirection from 'char [12]'
2>..srcmapstatus.c(2246): warning C4024: 'function through pointer' : different types for formal and actual parameter 2
if(battle_config.enable_extra_bonus){
if(battle_config.enable_extra_bonus == 2){
if(pc_readglobalreg(sd,"extra_bonus") && extra_bonus[pc_readglobalreg(sd,"extra_bonus")].script)
run_script(extra_bonus[pc_readglobalreg(sd,"extra_bonus")].script,0,sd->bl.id,0);
if (!calculating)
return 1;
} else {
for(i=1;i<ARRAYLENGTH(extra_bonus);i++) {
if(extra_bonus.script)
run_script(extra_bonus.script,0,sd->bl.id,0);
if (!calculating)
return 1;
}
}
}
The red lines are the one stated in warning compilation...
Thank you