* Allowed the NPCs without proper curly brackets to still load, but give an error still [Codemaster]
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@709 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
b0e36adc2b
commit
e8e06ecda3
@ -1,5 +1,6 @@
|
|||||||
Date Added
|
Date Added
|
||||||
12/21
|
12/21
|
||||||
|
* Allowed the NPCs without proper curly brackets to still load, but give an error still [Codemaster]
|
||||||
* Added variable 'current_file' which tells the filename of the script while loading npcs [MC Cameri]
|
* Added variable 'current_file' which tells the filename of the script while loading npcs [MC Cameri]
|
||||||
-the variable its set in do_init_npc() or something like that, so you can only access it
|
-the variable its set in do_init_npc() or something like that, so you can only access it
|
||||||
after the use of do_init_npc().
|
after the use of do_init_npc().
|
||||||
|
@ -1675,11 +1675,11 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line
|
|||||||
}
|
}
|
||||||
if(curly_count > 0) {
|
if(curly_count > 0) {
|
||||||
printf("\n");
|
printf("\n");
|
||||||
snprintf(tmp_output,sizeof(tmp_output),"Script skipped. Missing rig"
|
snprintf(tmp_output,sizeof(tmp_output),"Missing rig"
|
||||||
"ht curly brace at line '"CL_WHITE"%d"CL_RESET"' of file \n\t'"
|
"ht curly brace at line '"CL_WHITE"%d"CL_RESET"' of file \n\t'"
|
||||||
CL_WHITE"%s"CL_RESET"'.\n",*lines,current_file);
|
CL_WHITE"%s"CL_RESET"'.\n",*lines,current_file);
|
||||||
ShowWarning(tmp_output);
|
ShowWarning(tmp_output);
|
||||||
script=NULL;
|
//script=NULL; // Let's load it anyway I guess :p
|
||||||
//exit(1); //Wtf? We do we exit?
|
//exit(1); //Wtf? We do we exit?
|
||||||
} else {
|
} else {
|
||||||
// printf("Ok line %d\n",*lines);
|
// printf("Ok line %d\n",*lines);
|
||||||
@ -2370,8 +2370,8 @@ int do_init_npc(void)
|
|||||||
} else if (strcmpi(w2,"script")==0 && count > 3) {
|
} else if (strcmpi(w2,"script")==0 && count > 3) {
|
||||||
if( strcmpi(w1,"function")==0 ){
|
if( strcmpi(w1,"function")==0 ){
|
||||||
npc_parse_function(w1,w2,w3,w4,line+w4pos,fp,&lines);
|
npc_parse_function(w1,w2,w3,w4,line+w4pos,fp,&lines);
|
||||||
}else{
|
} else {
|
||||||
npc_parse_script(w1,w2,w3,w4,line+w4pos,fp,&lines);
|
npc_parse_script(w1,w2,w3,w4,line+w4pos,fp,&lines);
|
||||||
}
|
}
|
||||||
} else if ( (i=0,sscanf(w2,"duplicate%n",&i), (i>0 && w2[i]=='(')) && count > 3) {
|
} else if ( (i=0,sscanf(w2,"duplicate%n",&i), (i>0 && w2[i]=='(')) && count > 3) {
|
||||||
npc_parse_script(w1,w2,w3,w4,line+w4pos,fp,&lines);
|
npc_parse_script(w1,w2,w3,w4,line+w4pos,fp,&lines);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user