Hallo beim ist Gangwar VerBug Warum Ist Das So
Hier Der Error
ERROR: vio/fraktionen/gangareas.lua:257: attempt to compare nil with number
und Die Zeile
function attack_func ( player )
if validGangs[vioGetElementData ( player, "fraktion" )] and vioGetElementData ( player, "rang" ) >= 3 then
local x1, y1, z1 = getElementPosition ( player )
sucess = false
validID = nil
for i = 1, gangCount do
local x2, y2, z2 = getElementPosition ( _G["gangPickup"..i] )
if getDistanceBetweenPoints3D ( x1, y1, z1, x2, y2, z2 ) <= 3 then
validID = i
sucess = true
break
end
end
if sucess then
local pickup = _G["gangPickup"..validID]
local owner = tonumber ( vioGetElementData ( pickup, "gang" ) )
if owner ~= vioGetElementData ( player, "fraktion" ) then
if getFactionMembersOnline ( owner ) >= 3 then
if not gangAreaUnderAttack then
local lastAttacked = tonumber ( MySQL_GetString("gangs", "LastAttacked", "Nummer LIKE '" ..tonumber(validID).."'") )
local time = getRealTime()
257 == if time.timestamp > lastAttacked then
startGangAreaAttack ( player, pickup, owner, validID )
end
else
outputChatBox ( "Es kann immer nur ein Angriff zur selben Zeit stattfinden!", player, 125, 0, 0 )
end
else
outputChatBox ( "Es muessen mindestens 3 Mitglieder der verteidigenden Gang online sein!", player, 125, 0, 0 )
end
else
outputChatBox ( "Du kannst nicht dein eigenes Gebiet angreifen!", player, 125, 0, 0 )
end
else
outputChatBox ( "Du bist bei keinem Ganggebiet!", player, 125, 0, 0 )
end
else
outputChatBox ( "Du bist nicht befugt!", player, 125, 0, 0 )
end
end
addCommandHandler ( "attack", attack_func )
Danke Im Voraus Wer Mir Heflen *.*