- 128
- 6
- Версия MoonLoader
- .027.0-preview
Ошибка при загрузки скрипта:
[ML] (error) VH_ADSender.lua: opcode '0B39' call caused an unhandled exception
stack traceback:
[C]: in function 'sampGetCurrentServerAddress'
C:\Games\TRPtwo\moonloader\VH_ADSender.lua:45: in main chunk
код: ( в ошибке строка 45 - тут строка 4 )
[ML] (error) VH_ADSender.lua: opcode '0B39' call caused an unhandled exception
stack traceback:
[C]: in function 'sampGetCurrentServerAddress'
C:\Games\TRPtwo\moonloader\VH_ADSender.lua:45: in main chunk
код: ( в ошибке строка 45 - тут строка 4 )
Код:
if not doesDirectoryExist(getWorkingDirectory().."/config") then
createDirectory(getWorkingDirectory().."/config")
end
if not doesDirectoryExist(getWorkingDirectory().."/config/VH_ADSender/"..sampGetCurrentServerAddress()) then
createDirectory(getWorkingDirectory().."/config/VH_ADSender/"..sampGetCurrentServerAddress())
end
local tableConfig = {
["active"] = true,
["HOUSE"] = {},
["HouseAds"] = {},
["StartAd"] = {}
}
local linkConfig = getWorkingDirectory() .. "/config/VH_ADSender/"..sampGetCurrentServerAddress().."/"..sampGetPlayerNickname(sampGetPlayerIdByCharHandle(playerPed))..".json"
if not doesFileExist(linkConfig) then
local file = io.open(linkConfig, "w")
file:write(encodeJson(tableConfig))
io.close(file)
end
if doesFileExist(linkConfig) then
local file = io.open(linkConfig, "r")
if file then
local code = decodeJson(file:read("*a"))
end
local file = io.open(linkConfig, "r")
if file then
db = decodeJson(file:read("*a"))
end
io.close(file)
end