krazyito65 / CrossGambling

This is a gambling addon that requires users to roll the amount of gold they wish to bet. The winnings and losses are calculated from the difference between the highest and lowest numbers rolled.
1 stars 9 forks source link

Attempt to Perform Arithmetic on field 'chat' #5

Closed Cistoran closed 6 years ago

Cistoran commented 6 years ago

Received this LUA error on login when CG loaded. I didn't even try to run a game.

3x CrossGambling\CrossGambling-0.4.lua:291: attempt to perform arithmetic on field 'chat' (a boolean value)
CrossGambling\CrossGambling-0.4.lua:291: in function `CrossGambling_OnClickCHAT'
[string "*:OnClick"]:1: in function <[string "*:OnClick"]:1>

Locals:
(*temporary) = <table> {
 bans = <table> {
 }
 stats = <table> {
 }
 whispers = false
 active = 1
 chat = true
 joinstats = <table> {
 }
 channel = "gambling"
 hightie = <table> {
 }
 lastroll = "100000"
 lowtie = <table> {
 }
 strings = <table> {
 }
}
(*temporary) = true
(*temporary) = 3
(*temporary) = "attempt to perform arithmetic on field 'chat' (a boolean value)"
chatmethods = <table> {
 1 = "RAID"
 2 = "GUILD"
 3 = "CHANNEL"
}
chatmethod = nil
krazyito65 commented 6 years ago

Is it constantly happening? or does it only happen once?

We changed that field a bit, so try changing the guild/raid/custom channel options and see what happens

Or you could just go into your saved variables, and change the "chat" option to a 1, 2, or 3.

this error just seems like a bit of legacy issue when we added custom channels.

krazyito65 commented 6 years ago

Issue fixed by editing saved variables file, changes true/false for the chat option to a 1.

krazyito65 commented 6 years ago

This commit fixed this as well for future: 4d6c1886c24687c84f03063d4bad737087da87e9 bf6b0ac4679a473af11ef6f9a7714b53b11a2287