So, I’ve been working on a trade log, with nothing special in particular.
Up until today, I’ve been doing fine with bindable events and functions.
But today, I got this error thrown at me:
Here is my script:
-- alessdai
local httpService = game:GetService("HttpService")
game.ServerScriptService.Functions.TradeLog.Event:Connect(function(plr1,plr2, tbl)
-- Proccess a table to encode
local trade ={}
trade.Plyr1 = plr1.Name
trade.Plyr2 = plr2.Name
trade.P1Offer ={}
trade.P2Offer ={}
local numberPog1 = 0
local numberPog2 = 0
for i,v in pairs(tbl.Player1Offerings:GetChildren()) do
table.insert(trade.P1Offer, numberPog1, v.Value)
numberPog1 = numberPog1 + 1
end
for i,x in pairs(tbl.Player2Offerings:GetChildren()) do
table.insert(trade.P2Offer, numberPog2, x.Value)
numberPog1 = numberPog2 + 1
end
local JSONencoded = httpService:JSONEncode(trade)
local safe = false
-- Run a security test
local JSONdecoded = httpService:JSONDecode(JSONencoded)
if JSONdecoded.Plyr1 ~= trade.Plyr1 then
-- Instantly assume somehing is wrong
print("ERROR! Json Decode is not equal to real tbl value!")
else
safe = true
end
-- not done yet
if safe == true then
print("yay!")
end
end)
Does anyone know what’s wrong with my script?
Thanks,
al
P.S. I’m a terrible scripter

