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

Why am I getting the gui error?

Asked by
NRCme 0
8 years ago

my code:

local serverStorage = game:GetService("ReplicatedStorage")
local sc = script.Parent
local inT = sc
local outT = sc.Parent.Output
local I = serverStorage.InfoScreens
local player = game.Players.LocalPlayer
local loadOver = false
local OutputText
local playerGUI = sc.Parent.Parent.Parent
local Console1 = playerGUI.Console1
local Console3 = playerGUI:WaitForChild("Console3")
local ErrorTxt
local OUTTXT = "Output"

local function clearIn()
    inT.Text = ""
end
local function clearOut()
    outT.Text = ""
end

local function start()
    Console1.Console.Frame.Visible = true
    Console1.Console.Input.Visible = true
    Console1.Console.Output.Visible = true

    Console3.Console.Frame.Visible = true
    Console3.Console.Input.Visible = true
    Console3.Console.Output.Visible = true
end

local function checkForInputStart()
    if sc:IsFocused() == false then
        if inT.Text == "start" then
            outT.Text = "start \n Start!"
            start()
            clearIn()
            print("start")
            loadOver = true
            return
        elseif inT.Text == "help" then      

            outT.Text = "help \n Help with what?"
            clearIn()
        elseif inT.Text == "about" then

            outT.Text = "About what?"
            clearIn()
        elseif inT.Text == "" then
            --nothing
        else
            ErrorTxt = inT.Text
            OUTTXT = ErrorTxt, "\n Error ", ErrorTxt "does not exist in the command database"
            clearIn()
        end
    end
end

local function checkForInput()



end

while true do 
    if loadOver == false then
    checkForInputStart()
    else
        checkForInput()
    end
    outT.Text = OUTTXT
    wait(0.1)
end

my error 19:48:00.018 - Players.Player1.PlayerGui.Console2.Console.Input. LocalScript:53: attempt to call upvalue 'ErrorTxt' (a string value)

can anyone tell em what I'm doing wrong?

0
You didn't properly concatenate line 53 properly, you would want to use .. to merge strings together. OUTTXT = ErrorTxt .. "\n Error " .. ErrorTxt .. "does not exist in the command database" M39a9am3R 3210 — 8y
0
Yeah, do .. instead of , as M39a9am3R said User#11440 120 — 8y
0
Still getting the same error M39a9am3R and wfvj014 NRCme 0 — 8y
0
never mind It worked NRCme 0 — 8y

Answer this question