Value errors any help??
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
01 | local ScriptContext = game:GetService( 'ScriptContext' ) |
02 | local getTime = require(game.ServerScriptService.Time) |
03 | local ErrorBoard = game.Workspace:WaitForChild( "ErrorBoard" ) |
04 | local Errors = ErrorBoard:WaitForChild( "ErrorsFolder" ) |
05 | local ErrorsDisplay = ErrorBoard:WaitForChild( "Errors" ).MainError |
07 | ScriptContext.Error:connect( function (Error, Trace, Script) |
09 | print (Error, Trace, Script, getTime()) |
10 | if Errors [ "1" ] .LineUsed.Value = = false then |
11 | Errors [ "1" ] .LineUsed.Value = true |
13 | Errors [ "1" ] .Value = Error, Trace, Script, getTime() |
14 | ErrorsDisplay [ "1" ] .Text = Errors [ "1" ] .Value |
15 | ErrorsDisplay [ "1" ] .LineUsed.Value = true |
16 | elseif Errors [ "2" ] .LineUsed.Value = = false then |
17 | Errors [ "2" ] .LineUsed.Value = true |
19 | Errors [ "2" ] .Value = Error, Trace, Script, getTime() |
20 | ErrorsDisplay [ "2" ] .Text = Errors [ "2" ] .Value |
21 | ErrorsDisplay [ "2" ] .LineUsed.Value = true |
22 | elseif Errors [ "3" ] .LineUsed.Value = = false then |
23 | Errors [ "3" ] .LineUsed.Value = true |
25 | Errors [ "3" ] .Value = Error, Trace, Script, getTime() |
26 | ErrorsDisplay [ "3" ] .Text = Errors [ "3" ] .Value |
27 | ErrorsDisplay [ "3" ] .LineUsed.Value = true |
28 | elseif Errors [ "4" ] .LineUsed.Value = = false then |
29 | Errors [ "4" ] .LineUsed.Value = true |
31 | Errors [ "4" ] .Value = Error, Trace, Script, getTime() |
32 | ErrorsDisplay [ "4" ] .Text = Errors [ "4" ] .Value |
33 | ErrorsDisplay [ "4" ] .LineUsed.Value = true |
Heres the module script its in serverscriptservice
2 | local CurrentTime = tonumber (game:GetService( "HttpService" ):GetAsync(TimeServer, true )) |
3 | local ServerTime = tick() |
5 | return function () return (CurrentTime / 1000 ) - ServerTime + tick() end |
Example script, workspace,
1 | local getTime = require(game.ServerScriptService.Time) |