Jump to content

Recommended Posts

Witam,robię system postaći z logowaniem i napotkałem problem

  
function RenderujInformacje() 
local item = guiComboBoxGetSelected(Postac_GUI.combobox[1]) 
if item ~= "" then 
local text = guiComboBoxGetItemText(Postac_GUI.combobox[1], item) 
local addowany = getElementByID(text) 
local imie = getElementData(addowany,"Imie") 
local nazwisko = getElementData(addowany,"Nazwisko") 
local id = getElementData(addowany,"IDPostaci") 
local kasa = getElementData(addowany,"Kasa") 
local score = getElementData(addowany,"Score") 
local data = getElementData(addowany,"Data") 
if getElementData(g_me,"Jezyk") == "Polski" then 
  
guiSetText(Postac_GUI.label[2],"Imie:"..imie.."\nNazwisko:"..nazwisko.."\nLiczba rozładunków:"..score.."\nData stworzenia postaći:"..data.."\nPieniadze postaći "..kasa.."$") 
end 
if getElementData(g_me,"Jezyk") == "Angielski" then 
guiSetText(Postac_GUI.label[2],"Name of character:"..imie.."\nSurname of the character:"..nazwisko.."\nThe total number of unloadings:"..score.."\nDate of creation character:"..data.."\nCharacter has "..kasa.."$") 
end 
end 
end 
addEventHandler ( "onClientGUIComboBoxAccepted",Postac_GUI.combobox[1],RenderujInformacje) 
  

tutaj tworzenie elementu addowany:

  
local addowany = createElement(v[3]..":"..v[1].." "..v[2],v[3]) 
setElementData(addowany,"Imie",v[1]) 
setElementData(addowany,"Nazwisko",v[2]) 
setElementData(addowany,"IDPostaci",v[3]) 
setElementData(addowany,"Kasa",v[4]) 
setElementData(addowany,"Score",v[5]) 
setElementData(addowany,"Data",v[6]) 
  

Gdy wybiore w comboboxie postać to crashuje mi sie mta,,Help

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...