Page 1 of 1

error:could not find acs library distance

Posted: Mon Jul 14, 2014 7:19 pm
by ibm5155
So, I trying to to load this file, but I get a message, "could not find acs library distance"

Idk why, I think I'm missing something :s, well, here's the distance.acs code

Code: Select all

#library "distance"
function int sqrt2 (int x){
	int r;
	x = x + 1 >> 1;
	while (x > r)
		x -= r++;
	return r;
}

function int ibm_distance (int tid1, int tid2){
	int x, y, z, d;
	x = (GetActorX(tid1) - GetActorX(tid2))/65536;
	y = (GetActorY(tid1) - GetActorY(tid2))/65536;
	z = (GetActorZ(tid1) - GetActorZ(tid2))/65536;
	d = sqrt2( x*x + y*y + z*z );
	return d;
}
and on map behavior, it load it with the #import "distance.acs" command...

Am I missing something?

RE: error:could not find acs library distance

Posted: Mon Jul 14, 2014 7:28 pm
by Catastrophe
Did you put distance in LOADACS?

RE: error:could not find acs library distance

Posted: Mon Jul 14, 2014 7:42 pm
by Vincent(PDP)
Have you put the script inside the A_START and A_END markers?
Or for .pk3: In the ACS folder?

RE: error:could not find acs library distance

Posted: Mon Jul 14, 2014 7:52 pm
by Monsterovich
#import means your script must be added to the acs include path (or included in zcommon.acs)

RE: error:could not find acs library distance

Posted: Mon Jul 14, 2014 7:56 pm
by ibm5155
well the problem was fixed, the libs were ok, the problem was with gzdoom builder, idk what happened, but I replaced the opened files on script editor and everything worked again O_o
but thanks anyway for the help guys :D

RE: error:could not find acs library distance

Posted: Mon Jul 14, 2014 11:43 pm
by ZzZombo
From what I got on #zamapping, the source files were replaced by compiled scripts, or vice versa.

RE: error:could not find acs library distance

Posted: Tue Jul 15, 2014 2:10 am
by ibm5155
actually, I don't know, on the first time, I compiled something wrong I think, because doom builder was only loading the wad file with the compiled source, the source code wasn't even on the wad
... and then I erased the compiled file, compiled it again, and drag from acc compiled file and droped on the wad, and, it worked :D
I still don't get at all the #library name, should it be the same name as the compiled file? I just let the same name as the compiled one, but I don't think it's how it work, because, It would be a bit dumb (from the compiler part) since you already got the file name with the file itself...