Wysłany: 2012-06-03, 21:44
emil880
Wiek: 30 Na forum: 5843 dni Posty: 107
Nick w MP: None
Piwa : 74
Pioruniasty
Mam problem z t? twoj? funkcj? w debugerze wyskakuje mi to
Kod: .lua:11 Bad argument @ 'interpolateBetween' [Expected easing-type at argument 8, got nil]
.lua:12 Bad argument @ 'interpolateBetween' [Expected easing-type at argument 8, got nil]
Prosze o szypk? pomoc
Wysłany: 2012-06-03, 21:52
Piorun
Wiek: 32 Na forum: 6712 dni Posty: 1837
Nick w MP: Piorun
Piwa : 516
13 argument?w powiniene? mie?. Sprawd? czy masz wszystkie.
Wysłany: 2012-06-06, 17:56
emil880
Wiek: 30 Na forum: 5843 dni Posty: 107
Nick w MP: None
Piwa : 74
Pioruniasty zobacz to kod
Kod:
function cameraMoveSoft(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, typeCameraMove)
local x = 0
local y = 0
function moveCamera()
x = x + 0.009
y = y + 0.009
local cameraX, cameraY, cameraZ = interpolateBetween(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, x, typeCameraMove)
local lookX, lookY, lookZ = interpolateBetween(camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, y, typeCameraMove)
setCameraMatrix(256, 656, 50, 1, 2, 3)
if cameraX == newCamPosX and cameraY == newCamPosY and cameraZ == newCamPosZ and lookX == newCamLookX and lookY == newCamLookY and lookZ == newCamLookZ then
removeEventHandler("onClientRender", getRootElement(), moveCamera)
end
end
addEventHandler("onClientRender", getRootElement(), moveCamera)
end
cameraMoveSoft(256, 656, 50, 653,254, 20, 1, 2, 3, 3, 2, 1, typeCameraMove ) ----------------------------------
Wysłany: 2012-06-06, 23:26
Piorun
Wiek: 32 Na forum: 6712 dni Posty: 1837
Nick w MP: Piorun
Piwa : 516
13 argument ?le. Powinien by? string. Zerknij na wiki, a zrozumiesz. Chodzi mi oczywi?cie o funkcj? "interpolateBetween". Poza tym jakby? przeanalizowa? m?j kod to wiedzia?by? jak poprawnie u?y? funkcji.
Wysłany: 2012-06-07, 14:37
emil880
Wiek: 30 Na forum: 5843 dni Posty: 107
Nick w MP: None
Piwa : 74
Jak zmieni?em na
Kod: cameraMoveSoft(256, 656, 50, 653,254, 20, 1, 2, 3, 3, 2, 1, string )
to w debugerze mi wyskakuje :
Kod: .lua:11 Bad argument @ 'interpolateBetween' [Expected easing-type at argument 8, got table]
.lua:12 Bad argument @ 'interpolateBetween' [Expected easing-type at argument 8, got table]
Wysłany: 2012-06-07, 20:34
Piorun
Wiek: 32 Na forum: 6712 dni Posty: 1837
Nick w MP: Piorun
Piwa : 516
String - typ zmiennej, a konkretniej tekst. Przyk?ady string?w:
"Ala ma kota, kot ma al?"
"123"
"Dom numer 2304"
A teraz przejd? na wiki MTA ( dla u?atwienia: www.wiki.mtasa.com ), znajd? funkcj? interpolateBetween i sprawd? jakie warianty kryj? si? pod 8 argumentem.
Wysłany: 2012-06-08, 15:18
emil880
Wiek: 30 Na forum: 5843 dni Posty: 107
Nick w MP: None
Piwa : 74
Chodzi ci o to "strEasingType"???
Wysłany: 2012-06-08, 17:08
Piorun
Wiek: 32 Na forum: 6712 dni Posty: 1837
Nick w MP: Piorun
Piwa : 516
Wysłany: 2012-06-08, 18:36
emil880
Wiek: 30 Na forum: 5843 dni Posty: 107
Nick w MP: None
Piwa : 74
Pioruniasty ,
To co mam tam wpisza?
Wysłany: 2012-06-08, 18:43
Piorun
Wiek: 32 Na forum: 6712 dni Posty: 1837
Nick w MP: Piorun
Piwa : 516
Wysłany: 2012-06-09, 13:03
emil880
Wiek: 30 Na forum: 5843 dni Posty: 107
Nick w MP: None
Piwa : 74
Pioruniasty ,
wie? mi napisz jaki jest ten 13 argument bo ja tego niemoge co? ogarn??
Wysłany: 2012-06-09, 13:50
Piorun
Wiek: 32 Na forum: 6712 dni Posty: 1837
Nick w MP: Piorun
Piwa : 516
Dobra, wpisz tam "Linear" i b?dzie po k?opocie.
Wysłany: 2012-06-09, 14:31
emil880
Wiek: 30 Na forum: 5843 dni Posty: 107
Nick w MP: None
Piwa : 74
Po wpiszaniu "Linear" w debugerze wyskakuje mi taki b??d
Kod: .lua:11 Bad argument @ 'interpolateBetween' [Expected easing-type at argument 8, got nil]
.lua:12 Bad argument @ 'interpolateBetween' [Expected easing-type at argument 8, got nil]
Wysłany: 2012-06-09, 14:48
Piorun
Wiek: 32 Na forum: 6712 dni Posty: 1837
Nick w MP: Piorun
Piwa : 516
Wysłany: 2012-06-09, 14:58
emil880
Wiek: 30 Na forum: 5843 dni Posty: 107
Nick w MP: None
Piwa : 74
Kod:
function cameraMoveSoft(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, typeCameraMove)
local x = 0
local y = 0
function moveCamera()
x = x + 0.009
y = y + 0.009
local cameraX, cameraY, cameraZ = interpolateBetween(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, x, typeCameraMove)
local lookX, lookY, lookZ = interpolateBetween(camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, y, typeCameraMove)
setCameraMatrix(256, 656, 50, 1, 2, 3)
if cameraX == newCamPosX and cameraY == newCamPosY and cameraZ == newCamPosZ and lookX == newCamLookX and lookY == newCamLookY and lookZ == newCamLookZ then
removeEventHandler("onClientRender", getRootElement(), moveCamera)
end
end
addEventHandler("onClientRender", getRootElement(), moveCamera)
end
cameraMoveSoft(256, 656, 50, 653,254, 20, 1, 2, 3, 3, 2, 1,Linear) ----------------------------------
Tagi: ruch :: kamery
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: