Hmm first time saw smthing like this... Pls help me out. +rep
#1

error 003: declaration of a local variable must appear in a compound block
error 010: invalid function or declaration
error 010: invalid function or declaration
fatal error 107: too many error messages on one line

Код:
Float:DistanceCameraTargetToLocation(Float:CamX, Float:CamY, Float:CamZ, Float:ObjX, Float:ObjY, Float:ObjZ, Float:FrX, Float:FrY, Float:FrZ) // error line

	new Float:TGTDistance;//error line
	TGTDistance = floatsqroot((CamX - ObjX) * (CamX - ObjX) + (CamY - ObjY) * (CamY - ObjY) + (CamZ - ObjZ) * (CamZ - ObjZ));
	new Float:tmpX, Float:tmpY, Float:tmpZ;
	tmpX = FrX * TGTDistance + CamX;
	tmpY = FrY * TGTDistance + CamY;
	tmpZ = FrZ * TGTDistance + CamZ;
	return floatsqroot((tmpX - ObjX) * (tmpX - ObjX) + (tmpY - ObjY) * (tmpY - ObjY) + (tmpZ - ObjZ) * (tmpZ - ObjZ));
}
Reply
#2

Didn't you forgot the opening bracket?
Reply
#3

Oh yeh thanks mate Didn't saw that coming + rep Ahh it show I gave you + rep
Reply
#4

Lol, glad I could help! What doesn't show?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)