I am encountering a script error while trying to use the atcommand function in my summon_monsters.txt script. The script is intended to summon monsters using a custom command. However, I receive the following error after reloading the script:
script error on npc/custom/summonmonsters.txt line 7
parse_callfunc: expected ')' to close argument list
2 : .@mob_id = getarg(0);
3 : .@qty = getarg(1);
4 :
5 : if (.@mob_id > 0 && .@qty > 0) {
6 : .@command$ = "@summony " + .@mob_id + " " + .@qty;
* 7 : atcommand(.@command$, getcharid(3));
8 : }
9 : }
Could someone please help me identify what might be causing this error and how to resolve it? Any suggestions or insights would be greatly appreciated!
Question
catanata
I am encountering a script error while trying to use the atcommand function in my summon_monsters.txt script. The script is intended to summon monsters using a custom command. However, I receive the following error after reloading the script:
function script summon_monsters { .@mob_id = getarg(0); .@qty = getarg(1); if (.@mob_id > 0 && .@qty > 0) { .@command$ = "@summony " + .@mob_id + " " + .@qty; atcommand(.@command$, getcharid(3)); } }
and error after reload
script error on npc/custom/summonmonsters.txt line 7 parse_callfunc: expected ')' to close argument list 2 : .@mob_id = getarg(0); 3 : .@qty = getarg(1); 4 : 5 : if (.@mob_id > 0 && .@qty > 0) { 6 : .@command$ = "@summony " + .@mob_id + " " + .@qty; * 7 : atcommand(.@command$, getcharid(3)); 8 : } 9 : }
Could someone please help me identify what might be causing this error and how to resolve it? Any suggestions or insights would be greatly appreciated!
Thank you in advance!
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.