Mirage Source

Free ORPG making software.
It is currently Fri Mar 29, 2024 3:06 pm

All times are UTC


Forum rules


Make sure your tutorials are kept up to date with the latest MS4 releases.



Post new topic Reply to topic  [ 1309 posts ]  Go to page 1, 2, 3, 4, 5 ... 53  Next
Author Message
 Post subject: String Checks
PostPosted: Thu Apr 02, 2009 3:29 pm 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
This is not my code, i found these examples. I don't remember where though...

Code:
Public Function IsAlpha(s As String) As Boolean
    If Not s Like "*[!A-Za-z]*" Then IsAlpha = True
End Function


Code:
Public Function IsAlphaNumeric(s As String) As Boolean
    If Not s Like "*[!0-9A-Za-z]*" Then IsAlphaNumeric = True
End Function


That's what I use in MR for our legal string checks.


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Thu Apr 02, 2009 3:32 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
I have never seen that before, care to explain :P

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Thu Apr 02, 2009 3:43 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Feb 02, 2007 4:50 am
Posts: 263
Location: usa michigan centriville
one only searches the string for capital a-z and lowercase a-z letters.

the other searches for 0-9 cap a-z and lowercase a-z letters based on how you want there names and passwords to be.

Much more accurate than the string check we have now.

_________________
Fuck? I really joined in 2006.
Spirea, Chat Rooms, Discussions, Help. everything you need in one spot.
http://spirean.com
I love my computer, you never ask for more, you can be my princess or be my whore


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Fri Apr 03, 2009 11:24 pm 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
WOW!!!
I didn't know VB6 has regular expressions!
That really RLZ!
=D

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sat Apr 04, 2009 1:03 am 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
But I never seen "!" used in a application language :S Dugor, care to explain how it works?

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sat Apr 04, 2009 1:13 am 
Offline
Persistant Poster
User avatar

Joined: Thu Aug 17, 2006 5:27 pm
Posts: 866
Location: United Kingdom
Its the 'not' operator, for example...

Code:
Public void Test(int moose){

   If moose != 1337 {
   moose = 1337;
   }

}


Says if the int being passed in isn't set to 1337 then set it to 1337 - see?


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sat Apr 04, 2009 1:55 am 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Fox wrote:
Its the 'not' operator, for example...

Code:
Public void Test(int moose){

   If moose != 1337 {
   moose = 1337;
   }

}


Says if the int being passed in isn't set to 1337 then set it to 1337 - see?

I understand the code you passed on. But he part:
Code:
!A-Za-z

I can't see how that would work. Why Za for example? I havn't googled this and I'm sure that would give me the info needed. But anyway, I'm to tired to go that way when I'm sure Dugor can explain it with his own words.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sat Apr 04, 2009 1:58 am 
Offline
Knowledgeable

Joined: Sun Jan 13, 2008 5:59 pm
Posts: 107
Uh.
Za?
Isn't it just "A-Z", Then "a-z" (A-Za-z)


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sat Apr 04, 2009 2:06 am 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
I'm getting too curious about this, the only reason I could think of it being this way is if he declares high characters and low characters. But still that seems odd because you could put a command around it to do that if the if statement wasn't constructed in that way. But I suppose that's the glory about that code. Easier and probably faster.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sat Apr 04, 2009 2:41 pm 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
http://msdn.microsoft.com/en-us/library/swf8kaxw.aspx

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sun Apr 05, 2009 4:01 pm 
Offline
Newbie

Joined: Sun Apr 05, 2009 10:29 am
Posts: 20
Small addon

IF IsNumeric(String) = True Then
Oh, its not true, cause its a string, not a number.
End If

To prevent players sending a string instead of a number which can lead to server crash.


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Wed Dec 01, 2021 8:40 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтsemiasphalticfluxсайтсайтсайт
сайтсайтсайтсайтсайтсайтhttp://taskreasoning.ruсайтсайтсайтинфосайтсайтtuchkasсайтсайт


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sun Jan 02, 2022 9:55 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Econ


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sun Jan 02, 2022 9:56 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
79.8


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sun Jan 02, 2022 9:57 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Bett


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sun Jan 02, 2022 9:58 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Bett


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sun Jan 02, 2022 9:59 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Dani


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sun Jan 02, 2022 10:01 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Vivr


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sun Jan 02, 2022 10:02 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Blac


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sun Jan 02, 2022 10:03 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Coli


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sun Jan 02, 2022 10:04 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Mark


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sun Jan 02, 2022 10:05 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Poin


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sun Jan 02, 2022 10:06 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Sile


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sun Jan 02, 2022 10:07 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
NiMH


Top
 Profile  
 
 Post subject: Re: String Checks
PostPosted: Sun Jan 02, 2022 10:08 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Orie


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1309 posts ]  Go to page 1, 2, 3, 4, 5 ... 53  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group