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

Wysłany: 2013-04-21, 12:00


vipSEBOvip

A poor begginer






Wiek: 26
Na forum: 5178 dni
Posty: 597
Nick w MP: xSebaPL

Piwa: 77

Respekt: 140
Respekt: 140

Witajcie, mam problem z usuwaniem button?w:

B??d
Bad 'element' pointer @ 'destroyElement'(1)

Kod:
local prawkoPed createPed(17, -2035.14, -118.141035.171875)
setElementInterior(prawkoPed3)
setElementRotation(prawkoPed00270)
buttons = {}

addEventHandler("onClientClick"getRootElement(),
function(buttonstateabsoluteXabsoluteYworldXworldYworldZclickedElement)
    if (clickedElement==prawkoPedthen
        local xgetScreenFromWorldPosition(-2035.14, -118.141035.171875)
        buttons[1] = guiCreateButton(xy10020"Rozmowa"false)
        addEventHandler("onClientGUIClick"buttons[1], startRozmowa)
    else
        for kbuttons in ipairs(buttons) do
            destroyElement(buttons)
        end
    end
end
)

function startRozmowa()
    for kbuttonss in ipairs(buttons) do
        destroyElement(buttonss)
    end
end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-21, 12:22


CRX







Wiek: 34
Na forum: 5671 dni
Posty: 114

Piwa: 106

Respekt: 51,6

Ostrzeżeń: 60%
Czemu u?y?e? destroyElement, zamiast guiSetVisible?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-21, 12:27


Riot

3X






Wiek: 29
Na forum: 5729 dni
Posty: 1123
Nick w MP: Riot/3X

Piwa: 286

Respekt: 123
Respekt: 123

Spr?buj doda? warunek czy taki element istnieje.

if isElement(buttonsthen
destroyElement(buttons)
end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-21, 12:33


vipSEBOvip

A poor begginer






Wiek: 26
Na forum: 5178 dni
Posty: 597
Nick w MP: xSebaPL

Piwa: 77

Respekt: 140
Respekt: 140

B??d znik?, ale button nie ;(

Postaw piwo autorowi tego posta
 

 
Tagi: bad :: element :: pointer :: destroyelement(1)
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Bad 'element' pointer @ 'destroyElement'(1) 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