Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Value errors any help??

Asked by 10 years ago

Well I have a script that detects errors, and prints them and then puts them on a surface gui. But I also have it to tell me the time of the error, the issue is it won't add the time value in the value, it just prints it and no errors, just ignores the time value, it should be a set of numbers like 14858394.193 something like that. Heres the model link, its just the board with the surface guis and not the scripts Heres the main script Not local its in workspace

local ScriptContext = game:GetService('ScriptContext')
local getTime = require(game.ServerScriptService.Time)
local ErrorBoard = game.Workspace:WaitForChild("ErrorBoard")
local Errors = ErrorBoard:WaitForChild("ErrorsFolder")
local ErrorsDisplay = ErrorBoard:WaitForChild("Errors").MainError
wait()
ScriptContext.Error:connect(function(Error, Trace, Script) 
    --Event ScriptContext.Error(string message, string stackTrace, Instance script)
    print(Error, Trace, Script, getTime())
    if Errors["1"].LineUsed.Value == false then
        Errors["1"].LineUsed.Value = true
        print'Line 1'
        Errors["1"].Value = Error, Trace, Script, getTime()
        ErrorsDisplay["1"].Text = Errors["1"].Value
        ErrorsDisplay["1"].LineUsed.Value = true
    elseif Errors["2"].LineUsed.Value == false then
        Errors["2"].LineUsed.Value = true
        print'Line 2'
        Errors["2"].Value = Error, Trace, Script, getTime()
        ErrorsDisplay["2"].Text = Errors["2"].Value
        ErrorsDisplay["2"].LineUsed.Value = true
    elseif Errors["3"].LineUsed.Value == false then
        Errors["3"].LineUsed.Value = true
        print'Line 3'
        Errors["3"].Value = Error, Trace, Script, getTime()
        ErrorsDisplay["3"].Text = Errors["3"].Value
        ErrorsDisplay["3"].LineUsed.Value = true
    elseif Errors["4"].LineUsed.Value == false then
        Errors["4"].LineUsed.Value = true
        print'Line 4'
        Errors["4"].Value = Error, Trace, Script, getTime()
        ErrorsDisplay["4"].Text = Errors["4"].Value
        ErrorsDisplay["4"].LineUsed.Value = true
    end
end)

Heres the module script its in serverscriptservice

local TimeServer = "http://www.timeapi.org/utc/now?%25Q"
local CurrentTime = tonumber(game:GetService("HttpService"):GetAsync(TimeServer, true))
local ServerTime = tick()

return function() return (CurrentTime / 1000) - ServerTime + tick() end

Example script, workspace,

local getTime = require(game.ServerScriptService.Time)
    wait()
    print(getTime())
    wait(1)
    print(getTime())
0
Its changes the value to something like this "TestingErrorBoard is not a valid member of Workspace" with out the numbers it should be like, "TestingErrorBoard is not a valid member of Workspace Workspace.Errors.ErrorTest, line 3 ErrorTest 1413546588.4789 Line 2 1413546588.5324" harvest109 0 — 10y

Answer this question