16.03.2012, 12:36
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
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)); }