Script works if command is issued via @warp prontera 123 123
However is I tried to warp with comma like @warp prontera,123,123 then an issue exist. may I ask to help fix the written script. Thanks!
- script war_pay -1,{
OnInit:
bindatcmd "warp",strnpcinfo(3)+"::OnWarpCommand";
end;
OnWarpCommand:
.@command$ = strtolower(.@atcmd_parameters$[0]);
dispbottom "It cost you 1,000 zeny to warp.";
if(.@atcmd_numparameters == 1 || .@atcmd_numparameters == 3){
if ( Zeny > 1000 ){
set Zeny, Zeny - 1000;
warp .@command$,atoi(.@atcmd_parameters$[1]),atoi(.@atcmd_parameters$[2]);
end;
}
if ( Zeny < 1000 ){
dispbottom "Can't warp you. You don't have zeny.";
end;
}
}
}
Error as seen below when using @warp with comma.
[Warning]: (mapindex_normalize_name) Map name ' prontera,123,123' is too long!
[Debug]: (buildin_warp) mapindex_name2id: Map "prontera,12" not found in index list!
[Debug]: pc_setpos: Passed mapindex(0) is invalid!
[Error]: buildin_warp: moving player 'awesome' to "prontera,123,123",0,0 failed.
Question
darking123
Script works if command is issued via @warp prontera 123 123
However is I tried to warp with comma like @warp prontera,123,123 then an issue exist. may I ask to help fix the written script. Thanks!
- script war_pay -1,{ OnInit: bindatcmd "warp",strnpcinfo(3)+"::OnWarpCommand"; end; OnWarpCommand: .@command$ = strtolower(.@atcmd_parameters$[0]); dispbottom "It cost you 1,000 zeny to warp."; if(.@atcmd_numparameters == 1 || .@atcmd_numparameters == 3){ if ( Zeny > 1000 ){ set Zeny, Zeny - 1000; warp .@command$,atoi(.@atcmd_parameters$[1]),atoi(.@atcmd_parameters$[2]); end; } if ( Zeny < 1000 ){ dispbottom "Can't warp you. You don't have zeny."; end; } } }
Error as seen below when using @warp with comma.
[Warning]: (mapindex_normalize_name) Map name ' prontera,123,123' is too long!
[Debug]: (buildin_warp) mapindex_name2id: Map "prontera,12" not found in index list!
[Debug]: pc_setpos: Passed mapindex(0) is invalid!
[Error]: buildin_warp: moving player 'awesome' to "prontera,123,123",0,0 failed.
Link to comment
Share on other sites
1 answer 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.