Hi guys,
Ive been trying to add this to the end of script.c at line 23440
int viewpointmap_sub(struct block_list *bl, va_list ap) {
struct map_session_data *sd;
int npc_id, type, x, y, id, color;
npc_id = va_arg(ap, int);
type = va_arg(ap, int);
x = va_arg(ap, int);
y = va_arg(ap, int);
id = va_arg(ap, int);
color = va_arg(ap, int);
sd = (struct map_session_data *)bl;
clif_viewpoint(sd, npc_id, type, x, y, id, color);
return 0;
}
BUILDIN_FUNC(viewpointmap) {
int type, x, y, id, color, m;
const char *map_name;
map_name = script_getstr(st, 2);
if ((m = map_mapname2mapid(map_name)) < 0)
return true; // Invalid Map
type = script_getnum(st, 3);
x = script_getnum(st, 4);
y = script_getnum(st, 5);
id = script_getnum(st, 6);
color = script_getnum(st, 7);
map_foreachinmap(viewpointmap_sub, m, BL_PC, st->oid, type, x, y, id, color);
return true;
}
// Add this to the list of script commands defined, look through the code, should be self explanitory.
BUILDIN_DEF(viewpointmap,"siiiii"),
but i receive this error
script.c:23441:2: error: expected expression before ‘int’
int viewpointmap_sub(struct block_list *bl, va_list ap) {
^
Makefile:76: recipe for target 'obj/script.o' failed
make[1]: *** [obj/script.o] Error 1
make[1]: Leaving directory '/home/rob/rathena/src/map'
Makefile:51: recipe for target 'map' failed
make: *** [map] Error 2
the file i got the code from ask me to add the code anywhere in between BUILDING_FUNC's i believe i have done that but obviously i haven't as it is giving errors out while compiling on Ubuntu server
Any help will be appreciated
Kind regards