Help fix this script debug town invasion

minx123

New member
Messages
283
Points
0
Github
minx123
//=========== Town Invasion ==========//=========== Version: 1.0 ===========- script towninvasion -1,{OnClock0800:OnClock1400:OnClock2000:OnClock0200:set .town,rand(11);setarray $@mapinvasion$[0],"invek";announce "A Boss is destroying our Invek city! Help us!",bc_all,0x00FFFF;sleep2 2000;announce "Hurry before it dominate the whole "+$@mapinvasion$[.town]+"!",bc_all,0x00FFFF;sleep2 5000;announce "This monster is quite elusive! So please beat it up!",bc_all,0x00FFFF;monster $@mapinvasion$[.town],0,0,"Bring it on!",1502,1,"towninvasion::OnInvadeKill";end;OnInvadeKill:announce "Good job, for keeping our city safe!!",bc_all,0x00FFFF;getitem 7227,10;end;OnInit:setarray $@mapinvasion$[0],"invek";end;}
[debug] cant detect invek map.

how to fix it?

 
@@minx123

Why do you want it to spawn on a map you don't have installed? The error you get basically says you want to spawn something on a map that doesn't exist in the servers mapcache.

 
Invek doesn't exist, also maps are case sensitive so check exact map name.

set .town,rand(11);

setarray $@mapinvasion$[0],"invek";

But only 1 map is defined.

Change the town to

.town = 0;

 
@@minx123

If your town was really named invek and would exist in the mapcache of your server, your script would work.

 
i guess that his invek map does exist, but like what dastgir said, the problem is the .town he ddn't change the value of it, it will work if he follows what dastgir recommended to do.

using this script might help u in future when u decided to add extra/more maps less hassle.

Code:
//=========== Town Invasion ==========//=========== Version: 1.0 ===========-	script	towninvasion	-1,{OnClock0800:OnClock1400:OnClock2000:OnClock0200:	.rand$ = .maps$[rand(getarraysize(.maps$))];	announce "A Boss is destroying our "+.rand$+" city! Help us!",bc_all,0x00FFFF;	sleep2 2000;	announce "Hurry before it dominate the whole "+.rand$+"!",bc_all,0x00FFFF;	sleep2 5000;	announce "This monster is quite elusive! So please beat it up!",bc_all,0x00FFFF;	monster .rand$,0,0,"Bring it on!",1502,1,"towninvasion::OnInvadeKill";	end;OnInvadeKill:	announce "Good job, for keeping our city safe!!",bc_all,0x00FFFF;	getitem 7227,10;	end;OnInit:	setarray .maps$[0],"invek"; // Maps	end;}
 
Last edited by a moderator:
Back
Top