Jump to content
  • 0

WoE Setter Script Error plz help


JassMax

Question


  • Group:  Members
  • Topic Count:  65
  • Topics Per Day:  0.02
  • Content Count:  235
  • Reputation:   0
  • Joined:  05/03/13
  • Last Seen:  

im getting this error could anyone plz help?

 

Script
 

// WoE Setter 3 Plug-in
// GM - Castle Ownership Change
// By: [GM]Xeon
// Version: 1.0.1

-	script	WoES3Pl_RChangeOwnership	-1,{
end;
OnLoadPlugins: //The following section adds the plug-in to the main NPC
	set $@woes3_pl_gmmenu$[getarraysize($@woes3_pl_gmmenu$)], "Change Castle Ownership";
	set $@woes3_pl_gm$[getarraysize($@woes3_pl_gm$)], "ChangeOwnership";
	end;
}

function	script	WoES3Pl_ChangeOwnership	{
L_Select:
	dispbottom "Select castle(s) to change the ownership of, enter the guild ID to change it when selected, otherwise enter 0 to release the castle(s).";
	menu $woe_towns$[1]+":"+$woe_towns$[2]+":"+$woe_towns$[3]+":"+$woe_towns$[4]+":"+$woe_towns$[5]+":"+$woe_towns$[6]+":"+$woe_towns$[7],-,"^FF0000Change all",-,"^000000Back",L_Return;
	if (@menu==8) { dispbottom "Are you positive you wish to change ownership for ALL castles for ALL towns?"; if (select("No","Yes")==2) { input .@gid; callsub(S_Change,127,31,.@gid); } goto L_Select; }
	set @temp, 64;
	for (set .@i, 7; .@i>0; set .@i,.@i-1) { if (.@i==@menu) { set @town, @temp; set @town_, .@i; } set @temp, @temp/2; }
L_SelectCastles:
	menu getd("$woe_cas"+@town_+"_1$[1]")+":"+getd("$woe_cas"+@town_+"_1$[2]")+":"+getd("$woe_cas"+@town_+"_1$[3]")+":"+getd("$woe_cas"+@town_+"_1$[4]")+((@set_town!=5)?":"+getd("$woe_cas"+@town_+"_1$[5]"):""),-,"Change all",-,"Back",L_Select;
	if (@menu==6) { dispbottom "Are you positive you wish to change ownership for ALL castles for this town?"; if (select("No","Yes")==2) { input .@gid; callsub(S_Change,@town,31,.@gid); } goto L_Select; }
	set @temp, 16;
	for (set .@i, 5; .@i>0; set .@i,.@i-1) { if (.@i==@menu) { set @cas, @temp; set @cas_,.@i; } set @temp, @temp/2; }
	input .@gid;
	callsub(S_Change,@town,@cas,.@gid);
	goto L_SelectCastles;
L_Return:
	return;

//Sub that sets castle ownership castles
//arg0=Town(s) bitmask, 127=All
//arg1=Castle(s) bitmask, 31=All
//arg2=Guild ID
S_Change:
	if (!getarg(2)||getguildname(getarg(2))=="null") { set .@ownerid, 0; set .@ownername$, "No Owner"; } else { set .@ownername$, getguildname(getarg(2)); set .@ownerid, getarg(2); }
	set .@tcode, getarg(0); set .@tcurrent, 64;
	for (set .@i_, 7; .@i_>0; set .@i_,.@i_-1) {
		if (.@tcode>=.@tcurrent) {
			set .@temp$, ""; set .@ccode, getarg(1); set .@ccurrent, 16;
			for (set .@i, 5; .@i>0; set .@i,.@i-1) {
				if (.@ccode>=.@ccurrent) {
					setcastledata(getd("$woe_cas"+.@i_+"_3$["+.@i+"]"),1,.@ownerid); set .@temp$, .@temp$+getd("$woe_cas"+.@i_+"_1$["+.@i+"]")+((.@ccode>.@ccurrent)?", ":" ");
					if (.@i_<5) { disablenpc "Kafra Staff#"+getd("$woe_cas"+.@i_+"_3$["+.@i+"]"); GetCastleData getd("$woe_cas"+.@i_+"_3$["+.@i+"]"),0,"::OnRecvCastle"; } //Some OnRecvCastle label in a guild script is spitting out 'Map "" not found' debugs =(
					if (.@i_>5) { disablenpc "Kafra Employee#"+((.@i==6)?"sch":"aru")+"0"+.@i; GetCastleData getd("$woe_cas"+.@i_+"_3$["+.@i+"]"),0,"::OnRecvCastle"+((.@i==6)?"sc":"Ar")+"0"+.@i; }
					for( set .@n, 4; .@n <= 9; set .@n, .@n+1 ) {
						SetCastleData getd("$woe_cas"+.@i_+"_3$["+.@i+"]"), .@n, 0;
					}
					set .@ccode, .@ccode-.@ccurrent;
				}
				set .@ccurrent, .@ccurrent/2;
			}
			if (getarg(0)!=127&&.@tcurrent!=16) announce "Castle ownership changed to [ "+.@ownername$+" ] for "+$woe_towns$[.@i_]+" ( Castle(s): "+((getarg(1)==31)?"All":.@temp$)+" )!",bc_all|bc_yellow;
			set .@tcode, .@tcode-.@tcurrent;
		}
		set .@tcurrent,.@tcurrent/2;
	}
	if (getarg(0)==127) {
		set .@temp$, ""; set .@ccode, getarg(1); set .@ccurrent, 16;
		for (set .@i, 5; .@i>0; set .@i,.@i-1) { if (.@ccode>=.@ccurrent) set .@temp$, .@temp$+.@i+((.@ccode>.@ccurrent)?", ":" "); set .@ccode, .@ccode-.@ccurrent; set .@ccurrent, .@ccurrent/2; }
		announce "Castle ownership changed to [ "+.@ownername$+" ] for All Towns ( Castle(s): "+((getarg(1)==31)?"All":.@temp$)+" )!",bc_all|bc_yellow;
	}
	return;
}

error in CMD


Bump~

post-17166-0-96851300-1398690877_thumb.jpg

Edited by JassMax
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  65
  • Topics Per Day:  0.02
  • Content Count:  235
  • Reputation:   0
  • Joined:  05/03/13
  • Last Seen:  

/swt  Bump~

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

getcastledata only use 2 parameter....not 3 anymore...

remove the extra event label parameter.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...