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

Wysłany: 2018-05-05, 00:07


P.Wiśnia

Programista LUA






Wiek: 24
Na forum: 4044 dni
Posty: 568
Nick w MP: P.Wiśnia

Piwa: 376

Respekt: 100
Respekt: 100

ERROR: skript.lua:44 attempt to compare two nil values

local spaces=tonumber(DGS:dgsGridListGetItemData(grid4, selectedRow, 2))
local maxspaces=tonumber(DGS:dgsGridListGetItemData(grid4, selectedRow, 3))
local reputation=tonumber(DGS:dgsGridListGetItemText(grid4, selectedRow, 3))
if spaces >= maxspaces then
outputChatBox("* Brak wolnych miejsc.", 255, 0, 0)
return
end
if reputation > getElementData(localPlayer,"player:reputation") then
outputChatBox("* Nie Posiadasz Wymaganej Reputacji.", 255, 0, 0)
return
end

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-05, 09:39


Qwertick

Coming soon...






Wiek: 23
Na forum: 3577 dni
Posty: 472
Nick w MP: Qwertick

Piwa: 2726

Respekt: 215,8
Respekt: 215,8Respekt: 215,8

Aaa kt?ra to 44 linijka?

Podpis

Kontakt
Discord: Qwertick#1210

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-05, 10:56


Xrent

-






Wiek: 21
Na forum: 3047 dni
Posty: 230
Nick w MP: Pazdam

Piwa: 535

Respekt: 295,3
Respekt: 295,3Respekt: 295,3Respekt: 295,3

Ostrzeżeń: 60%
Podaj kod w [.lua] [./lua] bez kropek i podaj ktora to 44 linijka.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-05, 11:13


P.Wiśnia

Programista LUA






Wiek: 24
Na forum: 4044 dni
Posty: 568
Nick w MP: P.Wiśnia

Piwa: 376

Respekt: 100
Respekt: 100


local spaces=tonumber(DGS:dgsGridListGetItemData(grid4selectedRow2)) 
local maxspaces=tonumber(DGS:dgsGridListGetItemData(grid4selectedRow3)) 
local reputation=tonumber(DGS:dgsGridListGetItemText(grid4selectedRow3)) 
if spaces >= maxspaces then     -<<<< Linijka 44
outputChatBox("* Brak wolnych miejsc."25500) 
return 
end 
if reputation getElementData(localPlayer,"player:reputation"then 
outputChatBox("* Nie Posiadasz Wymaganej Reputacji."25500) 
return 
end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-05, 11:16


Qwertick

Coming soon...






Wiek: 23
Na forum: 3577 dni
Posty: 472
Nick w MP: Qwertick

Piwa: 2726

Respekt: 215,8
Respekt: 215,8Respekt: 215,8

Zobacz to
local spaces=tonumber(DGS:dgsGridListGetItemData(grid4selectedRow2))
local maxspaces=tonumber(DGS:dgsGridListGetItemData(grid4selectedRow3))
local reputation=tonumber(DGS:dgsGridListGetItemText(grid4selectedRow3))
if spaces and #spaces >= maxspaces then
  outputChatBox("* Brak wolnych miejsc."25500)
  return
end
if reputation getElementData(localPlayer,"player:reputation"then
  outputChatBox("* Nie Posiadasz Wymaganej Reputacji."25500)
  return
end

A jak nie dzia?a to jeszcze to
local spaces=tonumber(DGS:dgsGridListGetItemData(grid4selectedRow2))
local maxspaces=tonumber(DGS:dgsGridListGetItemData(grid4selectedRow3))
local reputation=tonumber(DGS:dgsGridListGetItemText(grid4selectedRow3))
if #spaces >= maxspaces then
  outputChatBox("* Brak wolnych miejsc."25500)
  return
end
if reputation getElementData(localPlayer,"player:reputation"then
  outputChatBox("* Nie Posiadasz Wymaganej Reputacji."25500)
  return
end


Podpis

Kontakt
Discord: Qwertick#1210

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-05, 12:24


P.Wiśnia

Programista LUA






Wiek: 24
Na forum: 4044 dni
Posty: 568
Nick w MP: P.Wiśnia

Piwa: 376

Respekt: 100
Respekt: 100

Dzia?a a m?g? by? mi jeszcze to poprawi??
skript.lua:123 attempt to compare two nil values

    local cat=DGS:dgsGridListGetItemText(grid2selectedRow1)
    local cost=DGS:dgsGridListGetItemData(grid2selectedRow3)
    local zdane=DGS:dgsGridListGetItemText(grid2selectedRow4)
    if tonumber(cost) > getPlayerMoney(localPlayerthen <<<<<123
    exports.MXL_noti:createNotification("error""* Nie posiadasz tyle got?wki.")
    return
    end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-05, 12:41


Qwertick

Coming soon...






Wiek: 23
Na forum: 3577 dni
Posty: 472
Nick w MP: Qwertick

Piwa: 2726

Respekt: 215,8
Respekt: 215,8Respekt: 215,8

Masz dwa zobacz kt?re b?dzie dzia?a?o
local cat=DGS:dgsGridListGetItemText(grid2selectedRow1)
local cost=DGS:dgsGridListGetItemData(grid2selectedRow3)
local zdane=DGS:dgsGridListGetItemText(grid2selectedRow4)
if tonumber(cost) and #tonumber(cost) > getPlayerMoney(localPlayer) then
exports.MXL_noti:createNotification("error""* Nie posiadasz tyle got?wki.")
return
end

local cat=DGS:dgsGridListGetItemText(grid2selectedRow1)
local cost=DGS:dgsGridListGetItemData(grid2selectedRow3)
local zdane=DGS:dgsGridListGetItemText(grid2selectedRow4)
if #tonumber(cost) > getPlayerMoney(localPlayer) then
exports.MXL_noti:createNotification("error""* Nie posiadasz tyle got?wki.")
return
end
Je?eli pomog?em licz? na piwko lub respekt :)

Podpis

Kontakt
Discord: Qwertick#1210

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-05, 13:34


P.Wiśnia

Programista LUA






Wiek: 24
Na forum: 4044 dni
Posty: 568
Nick w MP: P.Wiśnia

Piwa: 376

Respekt: 100
Respekt: 100

W drugim:
skript.lua:123 attempt to get length of a nil value
nie dzia?a w pierwszy
inny_skript.lua:44 attempt to compare two nil values

    if tonumber(cost) <= getPlayerMoney(clientthen
        takePlayerMoney(client,cost)
    end 


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-06, 01:39


.RiV







Wiek: 25
Na forum: 3588 dni
Posty: 554
Nick w MP: Split

Piwa: 2596

Respekt: 597,8
Respekt: 597,8

local cat=DGS:dgsGridListGetItemText(grid2selectedRow1)
local cost=DGS:dgsGridListGetItemData(grid2selectedRow3)
local zdane=DGS:dgsGridListGetItemText(grid2selectedRow4)
if getPlayerMoney(localPlayer) < tonumber(costthen
exports.MXL_noti:createNotification("error""* Nie posiadasz tyle got?wki.")
return
end


Podpis

Autor OGRPG, na scenie MTA od 2012 roku.




Użytkownik: 08.08.2016
GTAO Member: 06.02.2017
Support-Team: 17.06.2017 & 01.06.2019 - 18.11.2019
Moderator: 14.01.2018 - 09.08.2018

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-06, 11:54


P.Wiśnia

Programista LUA






Wiek: 24
Na forum: 4044 dni
Posty: 568
Nick w MP: P.Wiśnia

Piwa: 376

Respekt: 100
Respekt: 100

Nadal to samo
skript.lua:123 attempt to compare two nil values

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-06, 14:15


.RiV







Wiek: 25
Na forum: 3588 dni
Posty: 554
Nick w MP: Split

Piwa: 2596

Respekt: 597,8
Respekt: 597,8

Daj sobie outputChatBox i wstaw sobie tam koszt i sprawd? co zwraca czy liczb? czy tekst.

Podpis

Autor OGRPG, na scenie MTA od 2012 roku.




Użytkownik: 08.08.2016
GTAO Member: 06.02.2017
Support-Team: 17.06.2017 & 01.06.2019 - 18.11.2019
Moderator: 14.01.2018 - 09.08.2018

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-06, 15:43


P.Wiśnia

Programista LUA






Wiek: 24
Na forum: 4044 dni
Posty: 568
Nick w MP: P.Wiśnia

Piwa: 376

Respekt: 100
Respekt: 100

Da?em i nic nie zwraca i tylko ten error.

Postaw piwo autorowi tego posta
 

 
Tagi: gridlist :: dgs
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