..:D&G:.. Posted January 20, 2014 Posted January 20, 2014 When I start my house system, I get the error attept to index local 'houseOwner' (a nil value) -- Create houses function createHouse ( houseid, ownerid, interiorid, housex, housey, housez, housesale, houseprice, housename, houselocked, boughtprice, passwordlocked, housepassword ) if ( housesale == 0 ) then _G["house"..tostring(houseid)] = createPickup ( housex, housey, housez, 3, 1272, 0) else _G["house"..tostring(houseid)] = createPickup ( housex, housey, housez, 3, 1273, 0) end local house = _G["house"..tostring(houseid)] local houseOwner = exports.DENmysql:querySingle( "SELECT * FROM accounts WHERE id = ?", tonumber(ownerid) ) setElementData(house, "houseid", houseid) setElementData(house, "ownername", houseOwner.username) setElementData(house, "ownerid", tonumber(ownerid)) setElementData(house, "interiorid", tonumber(interiorid)) setElementData(house, "housesale", tonumber(housesale)) setElementData(house, "houseprice", tonumber(houseprice)) setElementData(house, "housename", housename) setElementData(house, "houselocked", tonumber(houselocked)) setElementData(house, "boughtprice", tonumber(boughtprice)) setElementData(house, "housepassword", tonumber(housepassword)) setElementData(house, "passwordlocked", tonumber(passwordlocked)) end This is the line: setElementData(house, "ownername", houseOwner.username) MTA:Rust Pre-Alpha Build v.0.3: https://forum.mtasa.com/viewtopic.php?f=114&t=97848 2Pac: ''Only God can judge me!''
Castillo Posted January 20, 2014 Posted January 20, 2014 Is it me or that code is leaked from Dennis CSG scripts? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
..:D&G:.. Posted January 20, 2014 Author Posted January 20, 2014 I don't know, someone gave it to me -.- But is it? MTA:Rust Pre-Alpha Build v.0.3: https://forum.mtasa.com/viewtopic.php?f=114&t=97848 2Pac: ''Only God can judge me!''
Recommended Posts