Jump to content
  • 0

Help me on prompt


ZTzTopiaa

Question

local note = gg.prompt(
    {'Please input text'},
    {[1]='text'},
    {[1]='text'}
)
if note[1] == nil then
    gg.alert('Canceled')
end

if note[1] == novalue then

     gg.alert('Input text')

end

 

help me i want if people not input text on gg.prompt then gg.alert('input text')

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

while true do
local sel = gg.prompt({"Write something:"}, nil, {"text"})
if not sel then break end
local t = string.len(sel[1])
if t == 0 then
gg.alert("Please write something")
else
gg.alert(sel[1])
break
end
end

 

Link to comment
Share on other sites

20 hours ago, maulz said:

while true do
local sel = gg.prompt({"Write something:"}, nil, {"text"})
if not sel then break end
local t = string.len(sel[1])
if t == 0 then
gg.alert("Please write something")
else
gg.alert(sel[1])
break
end
end

 

Thx

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.