• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Crash By Every Quests

Dkadsfe

Member
Joined
Apr 1, 2016
Messages
280
Reaction score
22
Hi Players in my server Staff/Players they are all crashing everytime they use a chest for a quest can you please help me fix it?
Example of quest they are all the same except for items
Code:
local storage = 4022

local items = {
[1] = {item_id = 2491, item_count = 1},
[2] = {item_id = 2493, item_count = 1},
[3] = {item_id = 2414, item_count = 1}

}

local magicEffect = 25 --Magic effect for script--
local BAG_ID = 1987 --Set to bag they get for items--

function onUse(cid, item, fromPosition, itemEx, toPosition)

if getPlayerStorageValue(cid, storage) == 1 then
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return doPlayerSendCancel(cid, "It is empty.")
end

local weight = 0

for i = 1, #items do
    weight = weight + getItemWeightById(items[i].item_id)
end

local playerCap = getPlayerFreeCap(cid)
    if playerCap >= weight then
   local BAG = doPlayerAddItem(cid, BAG_ID, 1)
    setPlayerStorageValue(cid, storage, 1)
    doSendMagicEffect(getPlayerPosition(cid), magicEffect)
        for i = 1, #items do
            doAddContainerItem(BAG, items[i].item_id, items[i].item_count)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_GREEN, "You have found a "..getItemNameById(items[i].item_id)..".")
        end
    else
    return doPlayerSendCancel(cid, "You require "..weight.." capacity to obtain this reward.")
    end
return true
end
 
Hi Players in my server Staff/Players they are all crashing everytime they use a chest for a quest can you please help me fix it?
Example of quest they are all the same except for items
Code:
local storage = 4022

local items = {
[1] = {item_id = 2491, item_count = 1},
[2] = {item_id = 2493, item_count = 1},
[3] = {item_id = 2414, item_count = 1}

}

local magicEffect = 25 --Magic effect for script--
local BAG_ID = 1987 --Set to bag they get for items--

function onUse(cid, item, fromPosition, itemEx, toPosition)

if getPlayerStorageValue(cid, storage) == 1 then
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return doPlayerSendCancel(cid, "It is empty.")
end

local weight = 0

for i = 1, #items do
    weight = weight + getItemWeightById(items[i].item_id)
end

local playerCap = getPlayerFreeCap(cid)
    if playerCap >= weight then
   local BAG = doPlayerAddItem(cid, BAG_ID, 1)
    setPlayerStorageValue(cid, storage, 1)
    doSendMagicEffect(getPlayerPosition(cid), magicEffect)
        for i = 1, #items do
            doAddContainerItem(BAG, items[i].item_id, items[i].item_count)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_GREEN, "You have found a "..getItemNameById(items[i].item_id)..".")
        end
    else
    return doPlayerSendCancel(cid, "You require "..weight.." capacity to obtain this reward.")
    end
return true
end
@Itutorial
Should've used mine. :p

Since the server isn't crashing, what errors are you getting in console?
 
@Itutorial
Should've used mine. :p

Since the server isn't crashing, what errors are you getting in console?
I had a power outage yesterday beacuse of some winds so my computer went down :(
But I found this error players were getting
Code:
Comment:
Graphic Engine: DirectX9 (2)
Operating System: Windows Vista Family in USA
Processor: Intel Celeron N2820 @ 2
Video Card: Intel (R) HD GR
Last Packet Types: 180 160 180 160 180 160 131 160 112 101
Last Packet: 112 001 037 011 160 185 000 185 000 064 066 015 000 104 016 000
Player Position: [2694,2446,7]
Player Name: Mark Slingshot (Lvl: 83)
Player Action: 055 051 046 049 056 052 046 056 056 046 049 052 050 058 055 049 055 050
Player.cpp 361: exception occurred, reason:
Player.cpp 465: exception occurred, reason:
Control.cpp 1728: exception occurred (MessageType: 0 MaW: D3B290 MoW: 0), reason:
Control.cpp 1723: exception occurred, reason:
Control.cpp 386: exception occurred (Force?1:0 = 0), reason:
MainWindow.cpp 138: exception occurred (Surface = 1), reason:
ConsoleWindow.cpp 1682: exception occurred (Surface = 1), reason:
ConsoleWindow.cpp 800: exception occurred, reason:
GUI.cpp 1575: exception occurred, reason:
ConsoleWindow.cpp 147: exception occurred, reason:
ConsoleWindow.cpp 378: exception occurred, reason:
Talk.cpp 80: none is talking
Thu Apr 07 19:42:16 2016
Debug Assertion 8.60 Talk.cpp 80
 
Back
Top