I'm trying to create a ticket system using JDA (Discord development); Trouble with variables

huangapple 未分类评论48阅读模式
英文:

I'm trying to create a ticket system using JDA (Discord development); Trouble with variables

问题

所以,我有多个公共变量,但如果一个人有多个工单处于打开状态,这些变量会在工单之间共享,因为它是相同的脚本,这会导致程序出现故障,因为变量需要在工单创建时进行重置。我在思考是否可以使用对象,但我对如何实现毫无头绪。这是我的代码链接:https://paste.myst.rs/dj7

英文:

So, I have multiple public variables, but if one has multiple tickets open, the variables are shared between tickets, since it is the same script, which breaks the program since variables need to be reset at ticket creation. I was thinking if I could use objects, but I haven't the faintest idea how to implement that. Here's my code: https://paste.myst.rs/dj7

huangapple
  • 本文由 发表于 2020年7月27日 04:42:22
  • 转载请务必保留本文链接:https://java.coder-hub.com/63105490.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定