Giter VIP home page Giter VIP logo

Comments (6)

Znote avatar Znote commented on August 14, 2024

Could you elaborate further on the problem?

It is correct that the variables guild and enemyGuild does not return the guild id.

local guild, enemyGuild = Guild(guildId), Guild(enemyGuildId)

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

from znoteaac.

luanluciano93 avatar luanluciano93 commented on August 14, 2024

guildId and enemyGuildId are correctly arriving at the local function sendWarStatus, however when passing through the Guild(variable) it is becoming null

from znoteaac.

Znote avatar Znote commented on August 14, 2024

Replace:

local guild, enemyGuild = Guild(guildId), Guild(enemyGuildId)
if not guild or not enemyGuild then
return
end

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?

from znoteaac.

luanluciano93 avatar luanluciano93 commented on August 14, 2024

sendWarStatus: Error: Failed to load guild data from id: 2

from znoteaac.

Znote avatar Znote commented on August 14, 2024

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.

from znoteaac.

luanluciano93 avatar luanluciano93 commented on August 14, 2024

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.

from znoteaac.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.