Mhmd.z Posted January 2, 2016 Share Posted January 2, 2016 السلام عليكم ورحمة الله وبركاته ابي كود تحديد لو كان الكلام الي بالايديت ارقام مو كلمات يكمل الحدث Link to comment
Jupi Posted January 2, 2016 Share Posted January 2, 2016 tonumber type guiGetText guiGetText بيرجع لك سترنق حوله لرقم ب tonumber بعدين تحقق من نوعه ب type مثال s = "s4" if type(tonumber(s)) == "number" then print("it's a number") else print("it's not a number") end Link to comment
Mhmd.z Posted January 2, 2016 Author Share Posted January 2, 2016 مو فاهم , وضح , والمثال وش دخله بالايديت Link to comment
Jupi Posted January 2, 2016 Share Posted January 2, 2016 مو فاهم , وضح , والمثال وش دخله بالايديت شوف يا عم اول شيء لازم نجيب اللي مكتوب بلأيديت كيف؟ بوظيفة guiGetText(اسم الايديت او المتغير) الحين جبنا اللي مكتوب بلايديت لازم نحوله لرقم مشان نعرف اذا كان ينفع رقم ولا لا كيف نحوله رقم ؟ كذا tonumber(guiGetText(اسم الايديت او المتغير)) الحين تمام حولناه رقم نبي نتحقق اذا ما فيه حروف او مسافات مشان نعرف اذا يصلح ولا لا كيف؟ نستعلم وظيفة type كيف؟ كذا if type(tonumber(guiGetText(اسم الايديت او المتغير))) == "number" then --- end انشاء الله تكون فهمت Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now