Zirius 1 Posted November 12, 2014 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! Quote Share this post Link to post Share on other sites
0 malufett 247 Posted November 12, 2014 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;} 1 milk reacted to this Quote Share this post Link to post Share on other sites
0 Garr 117 Posted November 12, 2014 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). Quote Share this post Link to post Share on other sites
0 Zirius 1 Posted November 12, 2014 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* Quote Share this post Link to post Share on other sites
0 Zirius 1 Posted November 12, 2014 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;} How can it also show the file name and location? Quote Share this post Link to post Share on other sites
0 HD Scripts 3 Posted November 13, 2014 emulator/src/map/script.c Quote Share this post Link to post Share on other sites
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!
Share this post
Link to post
Share on other sites