Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2014-08-22, 11:22


adrik20022002







Wiek: 25
Na forum: 4819 dni
Posty: 6
Nick w MP: TheAdrik



Respekt: 50

Oto cz??? kodu w kt?rym wg. DB3 jest jaki? b??d. I przez to skrypt si? nie uruchamia

B??D:
ERROR: Loading script failed: PanelBP\client.lua:40: 'end' exected (to close 'function; at line 35) near 'else'

C-Side:
Kod:

addEventHandler("onClientMarkerHit", root, function(hitElement)
if source == theMarker1 and not isPedInVehicle(hitElement) then
guiSetVisible(GUIEditor_Window[1], true)
showCursor(true)
end
else
if source == theMarker2 and not isPedInVehicle(hitElement) then
guiSetVisible(GUIEditor_Window[1], true)
showCursor(true)
end
else
if source == theMarker3 and not isPedInVehicle(hitElement) then
guiSetVisible(GUIEditor_Window[1], true)
showCursor(true)
end
end
end


To s? linijki od 35 do 51.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-08-22, 13:37


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

else
if source == theMarker3 and not isPedInVehicle(hitElement) then



od kiedy if daje si? pod else. Else to zaprzeczenie if. Jak ju? chcesz da? kilka warunk?w to dajesz elseif

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-08-22, 17:36


adrik20022002







Wiek: 25
Na forum: 4819 dni
Posty: 6
Nick w MP: TheAdrik



Respekt: 50

PanMaszyna, Teraz kod wygl?da tak:

Kod:

addEventHandler("onClientMarkerHit", root, function(hitElement)
if source == theMarker1 and not isPedInVehicle(hitElement) then
guiSetVisible(GUIEditor_Window[1], true)
showCursor(true)
end
elseif source == theMarker2 and not isPedInVehicle(hitElement) then
guiSetVisible(GUIEditor_Window[1], true)
showCursor(true)
end
elseif source == theMarker3 and not isPedInVehicle(hitElement) then
guiSetVisible(GUIEditor_Window[1], true)
showCursor(true)
end
end
end


I znowu DB3 wywala b??d, ale inny, oto on:
ERROR: Loading script failed: PanelBP\client.lua:30: 'end' exepected (to close 'function' at line 35) near 'elseif'

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-08-22, 18:11


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

jeden if = jeden end.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Tagi: skrypt :: się :: nie :: uruchamia.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku