Hallo, MTA-Forum
Ich werde niemals in sachen von Datenbank connections etc nie durchblicken es ist zwar ein WARNING jedoch wird kein Marker/Haus erstellt.
WARNING: rl/Housesystem/House_s.lua:183: dbPoll failed; Duplicate entry "253" for key "PRIMARY"
Zeile:
Lua
function createNewHouse(player,cmd,int,Preis)
if(getElementData(player,'loggedin') == 1)then
if(getElementData(player,'Adminrang') >= 4)then
if(int and Preis and tonumber(int) <= 32)then
local int,x,y,z = getInterior(int)
local ID = table.getn(dbPoll(dbQuery(dbConnection,"SELECT ID FROM houses"),-1))+1
local x1,y1,z1 = getElementPosition(player)
DAS IST ZEILE 183 local result = dbPoll(dbQuery(dbConnection,"INSERT INTO houses VALUES(?,?,?,?,?,?,?,?,?,?,?)",ID,Preis,'none',int,false,x1,y1,z1,x,y,z),-1)
getChatBox(player,44)
else
getChatBox(player,43)
end
else
getChatBox(player,12)
end
end
end
addCommandHandler('createhouse',createNewHouse)
Alles anzeigen