D2JSP ERROR:

zielkster

New Member
Joined
Jul 21, 2005
Messages
1
Reaction score
0
hey i wanted to know if anyone can help me with an error i get every game when im doing pindle...it says:

error: pxp_exception: name, reference error, message= DA_FindClosestEnemyClassID is not defined

anyone know how i can fix it???? :dance
 

antiher0

New Member
Joined
Jul 23, 2005
Messages
2
Reaction score
0
check your config and search for DA_FindClosestEnemyClassID maybe, perhaps its not defined as true/false yet. Dunno though.
 

fattyxp

Member!
Joined
Feb 13, 2004
Messages
221
Reaction score
0
Website
shawnjcox.sh.funpic.org
It's a function call, not a variable. Meaning if it's erroring calling it, it doesn't exist in the d2j-attack.d2l. (which it should) go into your scripts/libs/common folder and open d2j-attack.d2l and search for that name, if it doesn't come up then put this in there:
Code:
// Function to find monsters using ClassID
function DA_FindClosestEnemyClassID(var1,var2,var3,var4) {

	var _posx = -1;
	var _posy = -1;
	var _radius;
	var _classid;
	var _unit;

	if (arguments.length > 3) {

		_posx = var1;
		_posy = var2;
		_radius = var3;
		_classid = var4;
	}
	else {

		_unit = var1;
		_radius = var2;
		_classid = var3;
	}

	var _closest = _radius;
	var _monsterid = 0;
	var _dist;

	var _enemy = getUnit(1,_classid);
	if (_enemy) { do {

		if ( DA_IsValidTarget( _enemy ) > 0 /*&& DC_CheckLOS(me.x,me.y,_enemy.x,_enemy.y,20,true)*/) {

			if (arguments.length > 2) {

				_dist = DM_Dist(_posx,_posy,_enemy.x,_enemy.y);
			}
			else {
				_dist =  DM_Dist(_unit.x,_unit.y,_enemy.x,_enemy.y);
			}

			if (_dist < _radius && _dist < _closest) {

				_closest = _dist;
				_monsterid = _enemy.gid;
			}
		}

	} while(_enemy.getNext(_classid)); }

	_enemy = getUnit(1,_classid);
	if (_enemy) { do {

		if ( DA_IsValidTarget( _enemy ) > 0 ) {

			if (_enemy.gid == _monsterid) {

				return copyUnit(_enemy);
			}
		}

	} while(_enemy.getNext(_classid)); }

	return null;
}
Also this is assuming you aren't using YAMB, just the XP scripts. I recommend YAMB so you can run multiple bosses each game and have less of a chance of a realm down when staying in the game so long.
 

NewPosts

New threads

Top