Szerző Téma: Itemsystem call bugg  (Megtekintve 771 alkalommal)

Itemsystem call bugg
« Dátum: 2016. Augusztus 24. - 14:42:10 »
0 Show voters
Tuneradionál nem tudja meghívni a cuccot...
Ötletek?
 

ERROR: fc_chat/pmS.lua:728: call: failed to call \'fc_itemsystem:updateItemValue\' [string \"?\"]

 

function setRadioChannel(thePlayer, commandName, slot, channel)
slot = tonumber( slot )
channel = tonumber( channel )
if not channel then
channel = slot
slot = 1
end
if not (channel) then
outputChatBox(\"Használat:#e7d9b0 /\" .. commandName .. \" [frekvencia]\", thePlayer, 0, 206, 209,true)
else
if (exports.fc_core:hasItem(thePlayer, 6)) then
   local count = 0
   local items = exports[\'fc_itemsystem\']:getItems(thePlayer)
   for k, v in ipairs( items ) do
      if v[1] == 6 then
         count = count + 1
         if count == slot then
            if tonumber(v[2]) > 0 then
               if channel > 0 and channel < 1000000000 then
                  if exports[\'fc_itemsystem\']:updateItemValue(thePlayer, k, channel) then -- EZ A HIBÁS SOR (728 sor)
                     outputChatBox(\"Beállítottad a rádiódat a #\" .. channel .. \" frekvenciára.\", thePlayer)
                     exports.sc_core:sendLocalMeAction(thePlayer, \"átálítja a rádiója frekvenciáját.\")
                  end
               else
                  outputChatBox(\"Tiltott frekvencia.\", thePlayer, 255, 0, 0)
               end
            else
               outputChatBox(\"A Rádiód ki van kapcsolva. ((/toggleradio))\", thePlayer, 255, 0, 0)
            end
            return
         end
      end
   end
   outputChatBox(\"Érvényltelen rádió ID! Nincs ennyi rádiód.\", thePlayer, 255, 0, 0)
else
   outputChatBox(\"Nincs rádiód!\", thePlayer, 255, 0, 0)
end
end
end
addCommandHandler(\"tuneradio\", setRadioChannel, false, false)

Itemsystem call bugg
« Válasz #1 Dátum: 2016. Augusztus 24. - 14:59:30 »
0 Show voters
kijavítanám neked hogyha meglenne az fc_itemsystem

Itemsystem call bugg
« Válasz #2 Dátum: 2016. Augusztus 24. - 15:56:19 »
0 Show voters
Idézetet írta: kundlam date=1472042530\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"62803\" data-ipsquote-contentclass=\"forums_Topic
Tuneradionál nem tudja meghívni a cuccot...
Ötletek?
 

ERROR: fc_chat/pmS.lua:728: call: failed to call \'fc_itemsystem:updateItemValue\' [string \"?\"]

 

function setRadioChannel(thePlayer, commandName, slot, channel)
slot = tonumber( slot )
channel = tonumber( channel )
if not channel then
channel = slot
slot = 1
end
if not (channel) then
outputChatBox(\"Használat:#e7d9b0 /\" .. commandName .. \" [frekvencia]\", thePlayer, 0, 206, 209,true)
else
if (exports.fc_core:hasItem(thePlayer, 6)) then
   local count = 0
   local items = exports[\'fc_itemsystem\']:getItems(thePlayer)
   for k, v in ipairs( items ) do
      if v[1] == 6 then
         count = count + 1
         if count == slot then
            if tonumber(v[2]) > 0 then
               if channel > 0 and channel < 1000000000 then
                  if exports[\'fc_itemsystem\']:updateItemValue(thePlayer, k, channel) then -- EZ A HIBÁS SOR (728 sor)
                     outputChatBox(\"Beállítottad a rádiódat a #\" .. channel .. \" frekvenciára.\", thePlayer)
                     exports.sc_core:sendLocalMeAction(thePlayer, \"átálítja a rádiója frekvenciáját.\")
                  end
               else
                  outputChatBox(\"Tiltott frekvencia.\", thePlayer, 255, 0, 0)
               end
            else
               outputChatBox(\"A Rádiód ki van kapcsolva. ((/toggleradio))\", thePlayer, 255, 0, 0)
            end
            return
         end
      end
   end
   outputChatBox(\"Érvényltelen rádió ID! Nincs ennyi rádiód.\", thePlayer, 255, 0, 0)
else
   outputChatBox(\"Nincs rádiód!\", thePlayer, 255, 0, 0)
end
end
end
addCommandHandler(\"tuneradio\", setRadioChannel, false, false)

 

Az item system ezen funkcióját is küld be ide.

Itemsystem call bugg
« Válasz #3 Dátum: 2016. Augusztus 24. - 16:19:22 »
0 Show voters
Sikerült megoldanom, zárom.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal