• 0
Sign in to follow this  
Followers 0
utofaery

Mapflag mapserver warning

Question

Q>what does this warning means

This happen'd when I tried to do this:

Map server error:

Spoiler

[Warning]: Unexpected type for argument 1. Expected number.
[Debug]: Data: label pos=3668
[Debug]: Function: __jump_zero
[Debug]: Source (NPC): TesterClone#TC01 at prontera (154,174)

A function call'ed on another npc with getmapflag check...of all mapflag found in constants

Spoiler

function    script    F_MFCheck    {

if ( getmapflag( strcharinfo(PC_MAP), mf_nomemo ) ) { 
        dispbottom ( " Yes mf_nomemo " ) ;
        } else {
        dispbottom ( " Not mf_nomemo " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_noteleport ) ) { 
        dispbottom ( " Yes mf_noteleport " ) ;
        } else {
        dispbottom ( " Not mf_noteleport " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_nosave ) ) { 
        dispbottom ( " Yes mf_nosave " ) ;
        } else {
        dispbottom ( " Not mf_nosave " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_nobranch ) ) { 
        dispbottom ( " Yes mf_nobranch " ) ;
        } else {
        dispbottom ( " Not mf_nobranch " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_nopenalty ) ) { 
        dispbottom ( " Yes mf_nopenalty " ) ;
        } else {
        dispbottom ( " Not mf_nopenalty " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_nozenypenalty ) ) { 
        dispbottom ( " Yes mf_nozenypenalty " ) ;
        } else {
        dispbottom ( " Not mf_nozenypenalty " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_pvp ) ) { 
        dispbottom ( " Yes mf_pvp " ) ;
        } else {
        dispbottom ( " Not mf_pvp " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_pvp_noparty ) ) { 
        dispbottom ( " Yes mf_pvp_noparty " ) ;
        } else {
        dispbottom ( " Not mf_pvp_noparty " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_pvp_noguild ) ) { 
        dispbottom ( " Yes mf_pvp_noguild " ) ;
        } else {
        dispbottom ( " Not mf_pvp_noguild " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_gvg ) ) { 
        dispbottom ( " Yes mf_gvg " ) ;
        } else {
        dispbottom ( " Not mf_gvg " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_gvg_noparty ) ) { 
        dispbottom ( " Yes mf_gvg_noparty " ) ;
        } else {
        dispbottom ( " Not mf_gvg_noparty " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_notrade ) ) { 
        dispbottom ( " Yes mf_notrade " ) ;
        } else {
        dispbottom ( " Not mf_notrade " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_noskill ) ) { 
        dispbottom ( " Yes mf_noskill " ) ;
        } else {
        dispbottom ( " Not mf_noskill " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_nowarp ) ) { 
        dispbottom ( " Yes mf_nowarp " ) ;
        } else {
        dispbottom ( " Not mf_nowarp " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_partylock ) ) { 
        dispbottom ( " Yes mf_partylock " ) ;
        } else {
        dispbottom ( " Not mf_partylock " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_noicewall ) ) { 
        dispbottom ( " Yes mf_noicewall " ) ;
        } else {
        dispbottom ( " Not mf_noicewall " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_snow ) ) { 
        dispbottom ( " Yes mf_snow " ) ;
        } else {
        dispbottom ( " Not mf_snow " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_fog ) ) { 
        dispbottom ( " Yes mf_fog " ) ;
        } else {
        dispbottom ( " Not mf_fog " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_sakura ) ) { 
        dispbottom ( " Yes mf_sakura " ) ;
        } else {
        dispbottom ( " Not mf_sakura " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_leaves ) ) { 
        dispbottom ( " Yes mf_leaves " ) ;
        } else {
        dispbottom ( " Not mf_leaves " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_clouds ) ) { 
        dispbottom ( " Yes mf_clouds " ) ;
        } else {
        dispbottom ( " Not mf_clouds " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_clouds2 ) ) { 
        dispbottom ( " Yes mf_clouds2 " ) ;
        } else {
        dispbottom ( " Not mf_clouds2 " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_fireworks ) ) { 
        dispbottom ( " Yes mf_fireworks " ) ;
        } else {
        dispbottom ( " Not mf_fireworks " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_gvg_castle ) ) { 
        dispbottom ( " Yes mf_gvg_castle " ) ;
        } else {
        dispbottom ( " Not mf_gvg_castle " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_gvg_dungeon ) ) { 
        dispbottom ( " Yes mf_gvg_dungeon " ) ;
        } else {
        dispbottom ( " Not mf_gvg_dungeon " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_nightenabled ) ) { 
        dispbottom ( " Yes mf_nightenabled " ) ;
        } else {
        dispbottom ( " Not mf_nightenabled " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_nobaseexp ) ) { 
        dispbottom ( " Yes mf_nobaseexp " ) ;
        } else {
        dispbottom ( " Not mf_nobaseexp " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_nojobexp ) ) { 
        dispbottom ( " Yes mf_nojobexp " ) ;
        } else {
        dispbottom ( " Not mf_nojobexp " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_nomobloot ) ) { 
        dispbottom ( " Yes mf_nomobloot " ) ;
        } else {
        dispbottom ( " Not mf_nomobloot " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_nomvploot ) ) { 
        dispbottom ( " Yes mf_nomvploot " ) ;
        } else {
        dispbottom ( " Not mf_nomvploot " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_noreturn ) ) { 
        dispbottom ( " Yes mf_noreturn " ) ;
        } else {
        dispbottom ( " Not mf_noreturn " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_nowarpto ) ) { 
        dispbottom ( " Yes mf_nowarpto " ) ;
        } else {
        dispbottom ( " Not mf_nowarpto " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_nightmaredrop ) ) { 
        dispbottom ( " Yes mf_nightmaredrop " ) ;
        } else {
        dispbottom ( " Not mf_nightmaredrop " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_zone ) ) { 
        dispbottom ( " Yes mf_zone " ) ;
        } else {
        dispbottom ( " Not mf_zone " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_nocommand ) ) { 
        dispbottom ( " Yes mf_nocommand " ) ;
        } else {
        dispbottom ( " Not mf_nocommand " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_nodrop ) ) { 
        dispbottom ( " Yes mf_nodrop " ) ;
        } else {
        dispbottom ( " Not mf_nodrop " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_jexp ) ) { 
        dispbottom ( " Yes mf_jexp " ) ;
        } else {
        dispbottom ( " Not mf_jexp " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_bexp ) ) { 
        dispbottom ( " Yes mf_bexp " ) ;
        } else {
        dispbottom ( " Not mf_bexp " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_novending ) ) { 
        dispbottom ( " Yes mf_novending " ) ;
        } else {
        dispbottom ( " Not mf_novending " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_loadevent ) ) { 
        dispbottom ( " Yes mf_loadevent " ) ;
        } else {
        dispbottom ( " Not mf_loadevent " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_nochat ) ) { 
        dispbottom ( " Yes mf_nochat " ) ;
        } else {
        dispbottom ( " Not mf_nochat " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_noexppenalty ) ) { 
        dispbottom ( " Yes mf_noexppenalty " ) ;
        } else {
        dispbottom ( " Not mf_noexppenalty " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_guildlock ) ) { 
        dispbottom ( " Yes mf_guildlock " ) ;
        } else {
        dispbottom ( " Not mf_guildlock " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_town ) ) { 
        dispbottom ( " Yes mf_town " ) ;
        } else {
        dispbottom ( " Not mf_town " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_autotrade ) ) { 
        dispbottom ( " Yes mf_autotrade " ) ;
        } else {
        dispbottom ( " Not mf_autotrade " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_allowks ) ) { 
        dispbottom ( " Yes mf_allowks " ) ;
        } else {
        dispbottom ( " Not mf_allowks " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_monster_noteleport ) ) { 
        dispbottom ( " Yes mf_monster_noteleport " ) ;
        } else {
        dispbottom ( " Not mf_monster_noteleport " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_pvp_nocalcrank ) ) { 
        dispbottom ( " Yes mf_pvp_nocalcrank " ) ;
        } else {
        dispbottom ( " Not mf_pvp_nocalcrank " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_battleground ) ) { 
        dispbottom ( " Yes mf_battleground " ) ;
        } else {
        dispbottom ( " Not mf_battleground " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_reset ) ) { 
        dispbottom ( " Yes mf_reset " ) ;
        } else {
        dispbottom ( " Not mf_reset " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_notomb ) ) { 
        dispbottom ( " Yes mf_notomb " ) ;
        } else {
        dispbottom ( " Not mf_notomb " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_nocashshop ) ) { 
        dispbottom ( " Yes mf_nocashshop " ) ;
        } else {
        dispbottom ( " Not mf_nocashshop " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_noautoloot ) ) { 
        dispbottom ( " Yes mf_noautoloot " ) ;
        } else {
        dispbottom ( " Not mf_noautoloot " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_noviewid ) ) { 
        dispbottom ( " Yes mf_noviewid " ) ;
        } else {
        dispbottom ( " Not mf_noviewid " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_pairship_startable ) ) { 
        dispbottom ( " Yes mf_pairship_startable " ) ;
        } else {
        dispbottom ( " Not mf_pairship_startable " ) ;
}
if ( getmapflag( strcharinfo(PC_MAP), mf_pairship_endable ) ) { 
        dispbottom ( " Yes mf_pairship_endable " ) ;
        } else {
        dispbottom ( " Not mf_pairship_endable " ) ;
}

return;
}

Share this post


Link to post
Share on other sites

1 answer to this question

  • 0

1. that error means, if you have IF condition, using a label

prontera,158,185,5	script	jdshfjsdfh	1_F_MARIA,{
	if ( Onaaa )
		end;
Onaaa:
}
[Warning]: Unexpected type for argument 1. Expected number.
[Debug]: Data: label pos=33
[Debug]: Function: __jump_zero
[Debug]: Source (NPC): jdshfjsdfh at prontera (158,185)

 


2. can be simplify using array

prontera,158,185,5	script	jdshfjsdfh	1_F_MARIA,{
	for ( .@i = 0; .@i < .mapflagsize; ++.@i ) {
		if ( getmapflag( strcharinfo(PC_MAP), .mapflag[.@i] ) )
			dispbottom sprintf( _$( " Yes %s " ), .mapflag$[.@i] ), C_SPRINGGREEN;
		else
			dispbottom sprintf( _$( " Not %s " ), .mapflag$[.@i] ), C_RED;
	}
	end;
OnInit:
	setarray .mapflag$, "mf_nomemo", "mf_noteleport", "mf_nosave", "mf_nobranch", "mf_nopenalty", "mf_nozenypenalty", "mf_pvp", "mf_pvp_noparty", "mf_pvp_noguild", "mf_gvg", "mf_gvg_noparty", "mf_notrade", "mf_noskill", "mf_nowarp", "mf_partylock", "mf_noicewall", "mf_snow", "mf_fog", "mf_sakura", "mf_leaves", "mf_clouds", "mf_clouds2", "mf_fireworks", "mf_gvg_castle", "mf_gvg_dungeon", "mf_nightenabled", "mf_nobaseexp", "mf_nojobexp", "mf_nomobloot", "mf_nomvploot", "mf_noreturn", "mf_nowarpto", "mf_nightmaredrop", "mf_nocommand", "mf_nodrop", "mf_novending", "mf_loadevent", "mf_nochat", "mf_noexppenalty", "mf_guildlock", "mf_town", "mf_autotrade", "mf_allowks", "mf_monster_noteleport", "mf_pvp_nocalcrank", "mf_battleground", "mf_reset", "mf_notomb", "mf_nocashshop", "mf_noautoloot", "mf_noviewid", "mf_pairship_startable", "mf_pairship_endable";
	setarray .mapflag, mf_nomemo, mf_noteleport, mf_nosave, mf_nobranch, mf_nopenalty, mf_nozenypenalty, mf_pvp, mf_pvp_noparty, mf_pvp_noguild, mf_gvg, mf_gvg_noparty, mf_notrade, mf_noskill, mf_nowarp, mf_partylock, mf_noicewall, mf_snow, mf_fog, mf_sakura, mf_leaves, mf_clouds, mf_clouds2, mf_fireworks, mf_gvg_castle, mf_gvg_dungeon, mf_nightenabled, mf_nobaseexp, mf_nojobexp, mf_nomobloot, mf_nomvploot, mf_noreturn, mf_nowarpto, mf_nightmaredrop, mf_nocommand, mf_nodrop, mf_novending, mf_loadevent, mf_nochat, mf_noexppenalty, mf_guildlock, mf_town, mf_autotrade, mf_allowks, mf_monster_noteleport, mf_pvp_nocalcrank, mf_battleground, mf_reset, mf_notomb, mf_nocashshop, mf_noautoloot, mf_noviewid, mf_pairship_startable, mf_pairship_endable;
	.mapflagsize = 53;
	end;
}

PS: is there a way to convert these data .... that .mapflag$ into .mapflag from constant into string ?
when I tried *data_to_string it shows the loop array name instead of actual data

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0