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

Wysłany: 2018-02-15, 15:34


Dani3l_105







Wiek: 26
Na forum: 3754 dni
Posty: 21
Nick w MP: Dziki



Respekt: 45,3

Siemka, mam problem z przecho magic story

przecho dla niektorych dziala i te? nie,

[2018-02-15 15:32] ERROR: [podstawa]/msrpg-parking/s_parking.lua:23: attempt to get length of local 'result' (a boolean value)

wie ktos co tu zrobic?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-15, 15:42


Nexisten

Moderator






Wiek: 22
Na forum: 4107 dni
Posty: 551
Nick w MP: Nexisten

Piwa: 1479

Respekt: 287,3
Respekt: 287,3Respekt: 287,3Respekt: 287,3

Wiesz, fajnie by by?o jak by? poda? kod kt?ry znajduje si? w pliku s_parking.lua w odpowiednich znacznikach. Nikt tutaj nie jest jasnowidzem - niestety.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-15, 15:52


Dani3l_105







Wiek: 26
Na forum: 3754 dni
Posty: 21
Nick w MP: Dziki



Respekt: 45,3

--[[
    ResourceOURGame v2
    DevelopersSplit <split.programista@gmail.com>
    You have no right to use this code without my permission.
    (c2015 <split.programista@gmail.com>. All rights reserved.
]]

local mdestroy=createMarker(-228.02,1162.51,19.74-3"cylinder",6,200,25,25,75)
createBlipAttachedTo(mdestroy35)

local t=createElement("text")
setElementData(t,"scale",1)
setElementData(t,"name","Pozostawianie pojazd?w")
setElementPosition(t,-228.02,1162.51,19.74)


addEvent("onParkingGetRekords"true)
addEventHandler("onParkingGetRekords"root, function()
    local uid=getElementData(source,"player:uid")
    if not uid then return end
    local org getElementData(source,"player:organization")
    local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_vehicles WHERE (ownedPlayer=? OR ownedGroup=?) AND parking=1",uid,org or "Brak")
    if #result > 0 then
        triggerClientEvent(source"onParkingGetVehicles"sourceresult)
    end
end)

addEventHandler("onMarkerHit"mdestroy, function(el,md)
    if getElementType(el) == "player" then
        local veh=getPedOccupiedVehicle(el)
        if not veh then return end
        if getVehicleController(veh) ~= el then return end
        local id=getElementData(veh,"vehicle:id")
        if not id then return end
        if isTimer(timeroddaniathen return end
        setElementFrozen(veh,true)
        triggerClientEvent(el"dodaj:powiadomienie"root"* Pojazd wje?dza do przechowywalni...")
        toggleControl(el,"enter_exit",false)
        timeroddania=setTimer(function()
            exports["ogrpg-vehicles"]:onSaveVehicle(veh)
            destroyElement(veh)
            exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET parking=1 WHERE id=?"id)
            toggleControl(el,"enter_exit",true)
            triggerClientEvent(el"dodaj:powiadomienie"root"* Pojazd zosta? zapisany w przechowywalni.")
        end30001)
    end
end)

addEvent("onParkingVehicleSpawn"true)
addEventHandler("onParkingVehicleSpawn"root, function(id)
    if not id then return end
    local spawn=exports["ogrpg-vehicles"]:onRespawnVehicles(_,id,{-234.44,1154.45,19.45,359.5,0.0,2.7})
    if spawn then
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-15, 19:25


Eitho







Wiek: 24
Na forum: 3489 dni
Posty: 330
Nick w MP: Eitho

Piwa: 746

Respekt: 256,5
Respekt: 256,5Respekt: 256,5Respekt: 256,5

;)

Podpis
good old days :]
Ostatnio zmieniony przez Eitho 2018-02-15, 23:21, w całości zmieniany 2 razy  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-15, 20:35


Grace

Kierowca Pralki






Wiek: 24
Na forum: 3436 dni
Posty: 168
Nick w MP: Grace

Piwa: 1031

Respekt: 35,8

"Eitho" napisał/a:

if result and result 0 then


Jak podawaj to poprawnie :)

 if result and #result > 0 then 


a tak pozmieniaj zapytanie:
ocal result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_vehicles WHERE ownedPlayer=? OR ownedGroup=? AND parking=1"ownedPlayerownedGroup)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-15, 23:21


Eitho







Wiek: 24
Na forum: 3489 dni
Posty: 330
Nick w MP: Eitho

Piwa: 746

Respekt: 256,5
Respekt: 256,5Respekt: 256,5Respekt: 256,5

"Grace" napisał/a:

"Eitho" napisał/a:

if result and result 0 then


Jak podawaj to poprawnie :)

 if result and #result > 0 then 


a tak pozmieniaj zapytanie:
ocal result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_vehicles WHERE ownedPlayer=? OR ownedGroup=? AND parking=1"ownedPlayerownedGroup)


Faktycznie si? waln??em, przeoczy?em #, zapytanie jest napisane poprawnie. Zauwa?, i? w twoim zapytaniu odwo?ujesz si? do nieistniej?cych (w tym skrypcie) rzeczy:
  • ownedPlayer
  • ownedGroup.


Podpis
good old days :]
Postaw piwo autorowi tego posta
 

 
Tagi: przecho :: ogrpg/story
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Przecho OGRPG/STORY 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