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

01local ScriptContext = game:GetService('ScriptContext')
02local getTime = require(game.ServerScriptService.Time)
03local ErrorBoard = game.Workspace:WaitForChild("ErrorBoard")
04local Errors = ErrorBoard:WaitForChild("ErrorsFolder")
05local ErrorsDisplay = ErrorBoard:WaitForChild("Errors").MainError
06wait()
07ScriptContext.Error:connect(function(Error, Trace, Script)
08    --Event ScriptContext.Error(string message, string stackTrace, Instance script)
09    print(Error, Trace, Script, getTime())
10    if Errors["1"].LineUsed.Value == false then
11        Errors["1"].LineUsed.Value = true
12        print'Line 1'
13        Errors["1"].Value = Error, Trace, Script, getTime()
14        ErrorsDisplay["1"].Text = Errors["1"].Value
15        ErrorsDisplay["1"].LineUsed.Value = true
View all 35 lines...

Heres the module script its in serverscriptservice

2local CurrentTime = tonumber(game:GetService("HttpService"):GetAsync(TimeServer, true))
3local ServerTime = tick()
4 
5return function() return (CurrentTime / 1000) - ServerTime + tick() end

Example script, workspace,

1local getTime = require(game.ServerScriptService.Time)
2    wait()
3    print(getTime())
4    wait(1)
5    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