Detect all NPC file that uses goto

Zirius

New member
Messages
261
Points
0
I just want to avoid any future trouble, so I wanna ask if there's a way I can detect all NPC files that are using goto function. I have so many custom NPCs. Is there a way these goto function uses to show at my console so I can debug?

Thanks!

 
script.c

BUILDIN(goto){if( !data_islabel(script_getdata(st,2)) ){  ShowError("script:goto: not a labeln");  script->reportdata(script_getdata(st,2));  st->state = END;  return false;}ShowDebug("script.c: function 'goto' detected!n");st->pos = script_getnum(st,2);st->state = GOTO;return true;} 
default_ani_meow.gif


 
Why not just do a folder search with "goto"? Usually text editors provide such feature, like I know for sure both Notepad++ and Sublime Text have it via ctrl+shift+f (I use it pretty often, helps to find all the instances of something in specific folder. And if coupled with mass replace it helps even more, like I was able to switch to lowercase commands in all scripts quite easy).

 
Why not just do a folder search with "goto"? Usually text editors provide such feature, like I know for sure both Notepad++ and Sublime Text have it via ctrl+shift+f (I use it pretty often, helps to find all the instances of something in specific folder. And if coupled with mass replace it helps even more, like I was able to switch to lowercase commands in all scripts quite easy).
That's what I'm doing but sometimes false detect, *goto*
 
script.c

Code:
BUILDIN(goto){if( !data_islabel(script_getdata(st,2)) ){  ShowError("script:goto: not a labeln");  script->reportdata(script_getdata(st,2));  st->state = END;  return false;}ShowDebug("script.c: function 'goto' detected!n");st->pos = script_getnum(st,2);st->state = GOTO;return true;} 
default_ani_meow.gif
How can it also show the file name and location?
 
Back
Top