olg 0 Posted Thursday at 03:21 PM Dear All, I have a Custom NPC script but it has errors on map-server. All other NPC customs are working btw. Please see attached code error and screenshot: [Error]: script error in file 'npc/custom/fakeplayercommand.txt' line 57 column 27 parse_line: need ';' 54: input .@dye; 55: next; 56: //Job,Sex,hairstyle,haircolor,weapon,shield,headtop,headmid,headbot,clothcolor * 57: .@monster_gid = fakeplayer( .@map$, .@1st, .@2nd, .@Input$, .@job, .@sex, .@hairstyle, .@haircolor, .@weapon, .@shield, .@tophead, .@midhead, .@lowhead, .@dye, 0 ); ~~~~~~~~~~~~~~~~~~~~~~~~~~^ 58: message strcharinfo(0), "Congratulations! Your customize Fake Player "+.@Input$+" has been created."; 59: close; 60: [Error]: npc_parsesrcfile: Unknown syntax in file 'npc/custom/fp.txt', line '7'. Stopping... * w1=BUILDIN_FUNC(fakeplayer) * w2= * w3= * w4= [Error]: script error in file 'npc/custom/daily.txt' line 67 column 18 parse_simpleexpr: unmatched ')' 64: sleep2 1000; 65: for(.@k = 0; .@k < 2; .@k++){ 66: if(!.@k){ * 67: if(!vip_status(VIP_STATUS_ACTIVE) && .VIPRewards$[#VIPRewardCon + 1] != ""){ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 68: //message strcharinfo(0),"[Daily Rewards]: Become a VIP for more rewards."; 69: continue; 70: } else if(#VIPRewardCon >= .@VIPSize){ THANK YOU! Quote Share this post Link to post Share on other sites
0 KirieZ 90 Posted Sunday at 01:03 AM Since both commands are custom, my first guess is that these commands may not exist in Hercules. although this error seems a bit weird for that... but my first suggestion would be to make sure you have those script commands in Hercules (maybe try to run them in a separate script to make sure they exists and work) Quote Share this post Link to post Share on other sites
0 olg 0 Posted 11 hours ago On 1/11/2026 at 9:03 AM, KirieZ said: Since both commands are custom, my first guess is that these commands may not exist in Hercules. although this error seems a bit weird for that... but my first suggestion would be to make sure you have those script commands in Hercules (maybe try to run them in a separate script to make sure they exists and work) Ok thanks. Tried a different script and worked smoothly. Quote Share this post Link to post Share on other sites
0 KirieZ 90 Posted 3 hours ago 7 hours ago, olg said: Ok thanks. Tried a different script and worked smoothly. Weird.. the errors itself are suggesting that the parser is expecting something that is missing. but at least looking at the parts of code that are shown in the error, they look fine. For the 2nd one, I suggest reviewing the entire NPC and search if there is any unmatched "(" / ")" pairs, not only on this part where the error is appearing, but try checking the entire npc (modern editors can do parenthesis matching, so this might help). maybe even try commenting out parts of the script to check if the error is gone to limit the area to look at. This may also help for the 1st one. I don't remember seeing an so open error like that before, so unfortunately this is the only suggestion I hve Quote Share this post Link to post Share on other sites
Dear All,
I have a Custom NPC script but it has errors on map-server. All other NPC customs are working btw. Please see attached code error and screenshot:
[Error]: script error in file 'npc/custom/fakeplayercommand.txt' line 57 column 27 parse_line: need ';' 54: input .@dye; 55: next; 56: //Job,Sex,hairstyle,haircolor,weapon,shield,headtop,headmid,headbot,clothcolor * 57: .@monster_gid = fakeplayer( .@map$, .@1st, .@2nd, .@Input$, .@job, .@sex, .@hairstyle, .@haircolor, .@weapon, .@shield, .@tophead, .@midhead, .@lowhead, .@dye, 0 ); ~~~~~~~~~~~~~~~~~~~~~~~~~~^ 58: message strcharinfo(0), "Congratulations! Your customize Fake Player "+.@Input$+" has been created."; 59: close; 60: [Error]: npc_parsesrcfile: Unknown syntax in file 'npc/custom/fp.txt', line '7'. Stopping... * w1=BUILDIN_FUNC(fakeplayer) * w2= * w3= * w4= [Error]: script error in file 'npc/custom/daily.txt' line 67 column 18 parse_simpleexpr: unmatched ')' 64: sleep2 1000; 65: for(.@k = 0; .@k < 2; .@k++){ 66: if(!.@k){ * 67: if(!vip_status(VIP_STATUS_ACTIVE) && .VIPRewards$[#VIPRewardCon + 1] != ""){ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 68: //message strcharinfo(0),"[Daily Rewards]: Become a VIP for more rewards."; 69: continue; 70: } else if(#VIPRewardCon >= .@VIPSize){THANK YOU!
Share this post
Link to post
Share on other sites