Jump to content

Recommended Posts

Witajcie xD

Prosiłem o pomoc na Forum gtao.pl ale nikt nie pomógł, więc może tu ktoś będzie w stanie mi pomóc :)

A mianowicie, pokazuje się Bad Argument ElementData

Od razu powiem że funkcja działa prawidłowo, usuwa to co ma usuwać, tylko że daje Błąd, nie wiem dlaczego :/

function usunWyswietlaneWiadomosci() 
    for _,v in ipairs(getElementsByType("gui-staticimage")) do 
        if getElementData(v,"Wiadomosc") then -- To zwraca błąd 
            destroyElement(v) 
        end 
    end 
end 

ElementData jest nadawana w ten sposób, tylko że masowo

  
function LadowanieListy(ID, pozWiadY, kolorWiadPasek, kolorWiadTekst, Nadawca, Tytul, Wiadomosc, Kiedy, Przeczytane) 
    OdbiorczaWiadomosc = guiCreateStaticImage(0/1024*x, pozWiadY/768*y, 579/1024*x, 16/768*y, ":RPG/image/Modern Gui/"..kolorWiadPasek..".png", false, ScrollOdbiorczaListaWiadomosci) 
    setElementData(OdbiorczaWiadomosc, "Wiadomosc", Wiadomosc) -- Tutaj jest nadawana ta ElementData..  
    setElementData(OdbiorczaWiadomosc, "Przeczytane", Przeczytane) 
                     
    -- I tam reszta funkcji 
  
end 

Proszę o pomoc xD

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...