Open luanluciano93 opened 2 years ago
Could you elaborate further on the problem?
It is correct that the variables guild
and enemyGuild
does not return the guild id.
https://github.com/Znote/ZnoteAAC/blob/88a13e6d1053884536017173aa98289b97c8a81f/Lua/TFS_10/revscriptsys/playerdeath.lua#L5
They are returning the guild objects/metatables. This seems to be the intended behavior.
The guild id's are passed through the function params and is called guildId
and enemyGuildId
guildId
and enemyGuildId
are correctly arriving at the local function sendWarStatus
, however when passing through the Guild(variable)
it is becoming null
With:
local guild = Guild(guildId)
local enemyGuild = Guild(enemyGuildId)
if not guild then
print("sendWarStatus: Error: Failed to load guild data from id: ".. guildId)
return
end
if not enemyGuild then
print("sendWarStatus: Error: Failed to load guild data from id: ".. enemyGuildId)
return
end
print("sendWarStatus: Loading guild data: OK")
What messages do you get in console when reproducing this issue?
sendWarStatus: Error: Failed to load guild data from id: 2
That is very weird, do you have any data associated to guild id 2 in SQL? In the guilds table? Which server distro are you using, which version?
If there is a bug with initializing a guild through its id, a workaround might be to send the player, and then use player:getGuild()
to retrieve the guild object properly.
That is very weird, do you have any data associated to guild id 2 in SQL? In the guilds table?
no
Which server distro are you using, which version?
nekiro tfs 1.4 8.60
I think it's a bug in the distro then, because the variables with guild ids arrive correctly and when passing through Guild(x) it changes.
It is not returning the guild id
https://github.com/Znote/ZnoteAAC/blob/88a13e6d1053884536017173aa98289b97c8a81f/Lua/TFS_10/revscriptsys/playerdeath.lua#L6