MasterC Posted December 14, 2021 Share Posted December 14, 2021 Hi guys, i need Command for Make a max length characters prompt script Anyone can help me? Link to comment Share on other sites More sharing options...
hoangninyb Posted December 14, 2021 Share Posted December 14, 2021 P=gg.prompt({"A"},nil,{"text"}} if string.lenP[1] > 10 then gg.alert("max char") elseif not string.find("@") then gg.alert("not @") end Link to comment Share on other sites More sharing options...
MasterC Posted December 14, 2021 Author Share Posted December 14, 2021 7 minutes ago, hoangninyb said: P=gg.prompt({"A"},nil,{"text"}} if string.lenP[1] > 10 then gg.alert("max char") elseif not string.find("@") then gg.alert("not @") end Thanks Link to comment Share on other sites More sharing options...
MasterC Posted December 14, 2021 Author Share Posted December 14, 2021 46 minutes ago, hoangninyb said: P=gg.prompt({"A"},nil,{"text"}} if string.lenP[1] > 10 then gg.alert("max char") elseif not string.find("@") then gg.alert("not @") end Try this method Not work, error in string.lenP[1] Link to comment Share on other sites More sharing options...
MonkeySAN Posted December 14, 2021 Share Posted December 14, 2021 P=gg.prompt({"A"},nil,{"text"}} if string.len(P[1]) > 10 then gg.alert("max char") elseif not string.find("@") then gg.alert("not @") end Link to comment Share on other sites More sharing options...
MasterC Posted February 15, 2022 Author Share Posted February 15, 2022 On 12/14/2021 at 2:13 PM, MonkeySAN said: P=gg.prompt({"A"},nil,{"text"}} if string.len(P[1]) > 10 then gg.alert("max char") elseif not string.find("@") then gg.alert("not @") end And to numbers? If (Len) is characters And number? What command? Ex: if values[1] <1 then return prompt end Not work for me Link to comment Share on other sites More sharing options...
MonkeySAN Posted February 15, 2022 Share Posted February 15, 2022 if tonumber(value[1]) < 1 ... Link to comment Share on other sites More sharing options...
MasterC Posted February 15, 2022 Author Share Posted February 15, 2022 1 hour ago, MonkeySAN said: if tonumber(value[1]) < 1 ... Thanks work here... ❤ Link to comment Share on other sites More sharing options...
Question
MasterC
Hi guys, i need Command for Make a max length characters prompt script
Anyone can help me?
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.