yasha Posted November 12, 2018 Share Posted November 12, 2018 while $charcnt < 40 if $selectedflag[$charcnt] = 18 or 21 then end if $charcnt = $charcnt + 1 wend so i tried this or 21 in my program to see if 2 numbers can run the same program it worked it ran when i typed in 18 and 21 the problem is that it keeps looping when i key it as 21 any ideas on what i am doing wrong or is this a bad usage of the function and how do i make it so 2 numbers run the same program. thank you in advance as i am very new to programming. Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted November 12, 2018 Share Posted November 12, 2018 (edited) @yasha The Or statement needs "something" to compare with, so: If $selectedflag[$charcnt] = 18 Or $selectedflag[$charcnt] = 21 Then ; Do whatever you want EDIT: Little tips! You can short this $charcnt = $charcnt + 1 like this $charcnt += 1 Edited November 12, 2018 by FrancescoDiMuro yasha 1 Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
yasha Posted November 12, 2018 Author Share Posted November 12, 2018 holy ...... thanks a lot Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted November 12, 2018 Share Posted November 12, 2018 @yasha You're welcome yasha 1 Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
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