안녕하세요, 항상 감사합니다.
변수 지정이 안되어 문의드립니다.
앞서 nlength1 등 n이 붙은 변수는 숫자고 나머지는 문자입니다.
cnt 가 들어간 변수 역시 숫자로 앞에서 모두 지정했습니다.
따로 command 창에 쓰면 아무 문제없이 지정이 되는데 리습파일로 만들어돌리면 지정이 안되고 nilnil 만 뜨네요.
문제가 되는 구문은 2번째 if문입니다.
2번째 if문에서 ndist2_x 변수가 지정이 안되는데 따로 command창에 붙어넣어서 돌리면 문제없이 지정이 됩니다.
뭐가 문제일까요?
=============================
(if (> nlength1 0)
(progn
(
(while (> nqty1 0)
(setq ndist1_x (+ (* -1000 len_cnt1 nlength1) (* 1000 nlength1) (* -1 clr_cnt1 nclearance)))
(setq dist1_x (rtos ndist1_X))
(setq dist1 (strcat dist1_x “,0”))
(command “insert” “cargo” “x” length1 “y” width1 dist1 “”)
(setq ncargoname_x1 (+ (* -1 clr_cnt1 nclearance) (* -1000 clr_cnt1 nlength1) (* -1 (/ (* 1000 nlength1) 2))))
(setq cargoname_x1 (rtos ncargoname_x1))
(setq cargoname1 (strcat cargoname_x1 “,0”))
(command “text” “s” “shipname” “j” “mc” cargoname1 “4000” “” item1)
(command “insert” “cog” “X” “1” “y” “1” cargoname1 “”)
(setq len_cnt1 (1+ len_cnt1))
(setq clr_cnt1 (1+ clr_cnt1))
(setq nqty1 (1- nqty1))
)
)
)
(princ)
)
(if (> nlength2 0)
(progn
(
(while (> nqty2 0)
(setq ndist2_x (+ (+ (* -1000 nlength1) ndist1_x) (* -1000 len_cnt2 nlength2) (* -1 clr_cnt2 nclearance)))
(setq dist2_x (rtos ndist2_x))
(setq dist2 (strcat dist2_x “,0”))
(command “insert” “cargo” “x” length2 “y” width2 dist2 “”)
(setq ncargoname_x2 (+ dist2_x (/ (* nlength2 -1000) 2)))
(setq cargoname_x2 (rtos ncargoname_x2))
(setq cargoname2 (strcat cargoname_x2 “,0”))
(command “text” “s” “shipname” “j” “mc” cargoname2 “4000” “” item2)
(command “insert” “cog” “X” “1” “y” “1” cargoname2 “”)
(setq len_cnt2 (1+ len_cnt2))
(setq clr_cnt2 (1+ clr_cnt2))
(setq nqty2 (1- nqty2))
)
)
)
(princ)
)
=========================================================
대외비라….
구글 번역 결과.
영문->한국어
그게 무슨 말인지 정확히(모르겠다)…
영문->일본어>한국어
내가 말하고있는 바로 그것입니다
오해하지 맙시다..
저라면 관련 소스를 올리겠습니다…
디버깅 할수 있게..
역시나 안되네요.. 문제가 뭘까요… 이상하게 함수 문법에러같아보이진 않는데 …
괄호는 어짜피 아래에 while 문 싸고있는 괄호라서 상관은 없을것 같습니다.
괄호가 더 있습니당 ~!! progn 밑에 괄호가 더 있어용
dist2_x 변수는 둘째치고 앞에 while 바로 다음 (setq ndist2_x ~~~~) 부분에서 ndist2_x가 지정이 안되고 nil로 떠서요…