utofaery Posted January 20, 2019 Posted January 20, 2019 I need help fixing this part of the script function script F_MvpArenaWarp { .@warpName$ = getmapinfo( strnpcinfo(3); // //pvp_n_3-4 .@nextwarp1$ = substr( .@warpName$ , 0, 5 ); //pvp_n_ .@nextwarp2$ = substr( .@warpName$ , 6, 6 ); //3 .@nextwarp3$ = substr( .@warpName$ , 7, 8 ); //-4 .@i = .@nextwarp2$; .@i = .@i + 1; .@nextwarp2$ = .@i; .@warpMap$ = .@nextwarp1$ + .@nextwarp2$ + .@nextwarp3$ ; dispbottom ( "Warped to :: " + .@warpName$ ); sleep (500); warp .@warpMap$,102,102; end; } .@warpName$ = getmapinfo( strnpcinfo(3); // //pvp_n_3-4 this is the line not working. always returning 0 in game. Quote
0 Haruka Mayumi Posted January 21, 2019 Posted January 21, 2019 .@warpName$ = getmapinfo( strnpcinfo(3) ); <--- missing 1 brace Quote
0 utofaery Posted January 22, 2019 Author Posted January 22, 2019 .@warpName$ = getmapinfo( strnpcinfo(3) ); // //pvp_n_3-4 For you suggestion map server spit out the error on this Spoiler parse_line: expected ';' 3 : { * 4 : .@warpName$ = getmapinfo( strnpcinfo(3) ')'; // //pvp_n_3-4 Or is there any other command I can resort to get what map name player or the interacting NPC map name with? Quote
0 AnnieRuru Posted January 22, 2019 Posted January 22, 2019 prontera,155,185,5 script kjsdhfkh 1_F_MARIA,{ mes "warp to MVP arena"; next; for ( .@i = 1; .@i <= 8; ++.@i ) { if ( !getmapusers( "pvp_n_"+ .@i +"-4" ) ) { warp "pvp_n_"+ .@i +"-4", 100, 100; end; } } mes "All 8 rooms are occupied"; close; } hmm ... I remember using getmapusers are not realiable... because the getmapusers check only when the player finished loading in the map so if having 2 or more players register at the same time, they might see each other that's why my private mvp room script use a variable instead of using getmapusers script command to check available map seriously though, this script can be done using instance ... then they never see each other Quote
Question
utofaery
I need help fixing this part of the script
function script F_MvpArenaWarp { .@warpName$ = getmapinfo( strnpcinfo(3); // //pvp_n_3-4 .@nextwarp1$ = substr( .@warpName$ , 0, 5 ); //pvp_n_ .@nextwarp2$ = substr( .@warpName$ , 6, 6 ); //3 .@nextwarp3$ = substr( .@warpName$ , 7, 8 ); //-4 .@i = .@nextwarp2$; .@i = .@i + 1; .@nextwarp2$ = .@i; .@warpMap$ = .@nextwarp1$ + .@nextwarp2$ + .@nextwarp3$ ; dispbottom ( "Warped to :: " + .@warpName$ ); sleep (500); warp .@warpMap$,102,102; end; }
.@warpName$ = getmapinfo( strnpcinfo(3); // //pvp_n_3-4
this is the line not working. always returning 0 in game.
3 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.