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

Wysłany: 2017-05-02, 14:06


zombiaczek11







Wiek: 30
Na forum: 3576 dni
Posty: 26
Nick w MP: Danio

Piwa: 2

Respekt: 50

Ostrzeżeń: 100%
Witam mam problem taki i? wyskakuje mi blad taki i nw jak go mam naprawi? wyskakuje on co 5 sekund ERROR: rpg_vehicles/vehicles_global.lua:25: attempt to compare nil with number


local custom_vehicles = { -- Do rozwini?cia
    [604] = {name="MFK"},
}

function getVehicleCustomName(model)
    local name ""
    if custom_vehicles[modelthen
        name custom_vehicles[model].name
    else
        name getVehicleNameFromModel(model)
    end
    return name
end

function zgasSilnik()
    for i,v in ipairs(getElementsByType("vehicle")) do
    local data getElementData(v"veh:fuel")
        if data then
        if tonumber(data) <= 0 then
            setVehicleEngineState(vfalse)
        end
end
    end
end
setTimer(zgasSilnik10000)

function zgasSilnikGas()
    for i,v in ipairs(getElementsByType("vehicle")) do
    local data getElementData(v"veh:gas")
        if data then
        if tonumber(data) <= 0 then
            setVehicleEngineState(vfalse)
        end
end
    end
end
setTimer(zgasSilnikGas10000)

Prosze o pomoc za pomoc daje :piwo: + R*

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-02, 16:58


mlodasnygo







Wiek: 16
Na forum: 3973 dni
Posty: 205

Piwa: 518

Respekt: 161,8
Respekt: 161,8Respekt: 161,8

Witam
Wed?ug mnie pogubi? si? if



local custom_vehicles = { -- Do rozwini?cia
    [604] = {name="MFK"},
}

function getVehicleCustomName(model)
    local name ""
    if custom_vehicles[modelthen
        name custom_vehicles[model].name
    else
        name getVehicleNameFromModel(model)
    end
    return name
end

function zgasSilnik()
    for i,v in ipairs(getElementsByType("vehicle")) do
    local data getElementData(v"veh:fuel")
        if data then
        if tonumber(data) <= 0 then
            setVehicleEngineState(vfalse)
        end
        end
    end
end
setTimer(zgasSilnik10000)

function zgasSilnikGas()
    for i,v in ipairs(getElementsByType("vehicle")) do
    local data getElementData(v"veh:gas")
        if data then
        if tonumber(data) <= 0 then setVehicleEngineState(vfalse)
        end
end
    end
end
setTimer(zgasSilnikGas10000)


W 25 linijce end by? postawiony w z?ym miejscu i system si? gubi? ;)

Podpis
600 dni - 10 marca 2017
:piwo: 500 piw :piwo: - 10 marca 2017
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-02, 18:28


_Haze

Peace Yo!






Wiek: 24
Na forum: 4184 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

spr?buj doda? w ifie
if tonumber(data) <= 0 then
da? tak
if tonumber(data) and tonumber(data) <= 0 then


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
zombiaczek11
Wysłany: 2017-05-02, 20:19


zombiaczek11







Wiek: 30
Na forum: 3576 dni
Posty: 26
Nick w MP: Danio

Piwa: 2

Respekt: 50

Ostrzeżeń: 100%
Temat do zamkni?cia

Postaw piwo autorowi tego posta
 

 
Tagi: pojazdy
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