OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: PJK on 12 Jan 2003, 17:18:32
-
Hello
I have done some camera scripting, but when intro/mission is launched, it gives error message:
"_camera camSetTarget |#|'T72": Error Invalid number in expression
In _camera camSetTarget I have target as T72 (or any name in unit) so line is:
_camera camSetTarget 'T72'
Same problem is with original name also (when using units original name...) OFP version is 1.90.
I appreciate all answers
PJK
-
_camera camSetTarget T72
Is the correct line, no ' ' around the target name.
-
Thank you KTottE, that's it (Is this between different versions, because camera.sqs gives ' ' markers itself?).
But now it qives second one. It says:
"_camera = cameraeffect |#|["internal", "back"]: Error Unknown operator
Line is:
_camera = cameraeffect ["internal", "back"]
It seems that everytime when I solve one problem, second one appears.
And all script is done by tutorials and camera.sqs itself...
PJK
-
Right, I don't see any errors in that second line. Weird.
Try rewriting the whole line and see if it works better.
-
I tried to regenerate line, and whole script, but no results yet.
I also create few new intros but always with same error message.
Next one is example of one script I just tried:
_camera = "camera" camcreate [0,0,0]
_camera = cameraeffect ["internal", "back"]
;=== 21:39:04
_camera camSetTarget [14163.48,103877.97,-8839.14]
_camera camSetPos [3030.86,4895.51,2.94]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
~10
I have also test different situations, like "external", "top" etc.
Thank you, KTottE, for your efforts
PJK
-
_camera = "camera" camCreate [0,0,0]
_camera cameraEffect ["internal","back"]
_camera camSetTarget [14163.48,103877.97,-8839.14]
_camera camSetPos [3030.86,4895.51,2.94]
_camera camSetFOV 0.700
_camera camCommit 0
~10
Copy paste that, and see if it works.
-
Now it hit right where it should be...
So it was that "=". For some reason I have put that = there, even if I checked that many times...
Thank you KTottE
PJK
-
This correction to my own post...
I ment, that I didn't change anything else than take = away between camera and cameraeffect. So it is a bit different from KTottE's suggestion, but seems to work...