Recoil Posted June 8, 2015 Share Posted June 8, 2015 It seems like I am running into issues with every simple task... Declared a global: Public Const MyTextLength As Integer = 70 Now I need to check what the user is typing: ' Check for IsTalking = True, continue with the rest of this... ' Check for Keys.Enter and do stuff ' Check for Keys.Back and delete a letter from MyText If MyText.Length = MyTextLength Then     Exit Sub End If ' Check for other keys... I'm setting a small limit for testing. When I bypass the length check everything works fine. When I include the above check before checking the rest of the keys, when I hit [Enter] to send the text (if it was typed over the limit) it starts the whole disconnecting deal over again. I have tried several variations of the above but running into walls. I could use an idea on how to check the length of MyText to limit the number of characters the user can input. Link to comment Share on other sites More sharing options...
Damian666 Posted June 8, 2015 Share Posted June 8, 2015 or... ya know, upload it to the source so i can help debug it? lol you dont have to do it alone ya know Link to comment Share on other sites More sharing options...
jcsnider Posted June 8, 2015 Share Posted June 8, 2015 Stop trying to limit it. Instead, make it so that if they reach as certain number of characters, it starts cutting parts off of the beginning of the string (only visually) so it gives a scrolling effect. Then maybe decide to limit it if it gets really obnoxious like 300 characters+ or so. Link to comment Share on other sites More sharing options...
Recoil Posted June 8, 2015 Author Share Posted June 8, 2015 No, I have it scrolling to adjust the view of the text working, what I meant was catching the limit of the MyTextLength. When I type over the amount and hit enter to send it, it errors for some reason but isn't showing anything. When I bypass the char limit, everything works fine, but just has unlimited characters that can be input. Link to comment Share on other sites More sharing options...
Damian666 Posted June 8, 2015 Share Posted June 8, 2015 normally when it just quits, it recieves or sends a packt that has a fault in it, if i try to send nothing from server, client quits, perhaps thats happening here? Link to comment Share on other sites More sharing options...
Recoil Posted June 9, 2015 Author Share Posted June 9, 2015 No, it isn't with the packets. I figured it out though. I had two if statements...one to check for Enter or backspace, then another to check the rest of the keys. All I had to do was move that to the first if statement and it worked <.< Link to comment Share on other sites More sharing options...
Damian666 Posted June 9, 2015 Share Posted June 9, 2015 lol... sometimes programming sucks huh? Link to comment Share on other sites More sharing options...
Recoil Posted June 9, 2015 Author Share Posted June 9, 2015 I get aggravated when it is small crap like this that takes me several hours to figure out, LOL. Link to comment Share on other sites More sharing options...
Damian666 Posted June 9, 2015 Share Posted June 9, 2015 yeah... i know the feeling man, spend a whole day this week, trying to load guilds from dats... damn redim shit... gets me everytime xd 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