PDA

View Full Version : How do I do this? :P


CampinCarl
05-08-2008, 12:24 AM
I have a custom profile field, and people keep incorrectly entering the information that needs to go in it, so i just need to know how to make it so the information they enter has to begin with the correct phrase
What I need it for: I have a custom field for someones steam ID, so they can enter their steam id, and they keep entering their steam name, so intstead of getting STEAM:0:0:1234567, im gettin stuff like "johnfrink", so i need to make it so whatever you enter has to start with STEAM:, :P

thanks

Marco van Herwaarden
05-08-2008, 11:57 AM
You can use the "Regular Expression" field in the Custom Profile Field to validate the input.

anuanu
08-24-2008, 12:21 PM
Same issue with me, I tried to understand how to do the regular expressions but i was completly confused.

Could you give me info to put into the field?

Dismounted
08-24-2008, 01:23 PM
Regular Expressions are daunting, I agree. But it is very, very useful. I use this site (http://www.regular-expressions.info/) as a reference.

anuanu
08-24-2008, 04:03 PM
From that site you gave me i was still confused but I played with the program "RegexBuddy" and i think I might have figured out the code i need but im not sure as im trying to test it out now.

the code:

steam_[0-9]:[0-9]:[0-9]*+

EDIT: i dont know how to prevent digits the repeat more then 4 times though

Dismounted
08-25-2008, 10:38 AM
The "formula" for a SteamID is: STEAM_X:Y:Z. Where X is an unsigned 8-bit value, Y is an unsigned 4-bit value and Z is an unsigned 32-bit value.
^(?-i)(STEAM_[0-9]{1,3}:[0-9]{1,2}:[0-9]{1,10})$
This expressions checks for length, but does not check actual value (ie. making sure value is 4-bit, etc.).

Videx
08-25-2008, 11:46 PM
People actually give you their Steam IDs???

ssslippy
08-26-2008, 12:26 AM
Steam ID's cant be exploited in anyway but its a great way for people to link accounts to server information. I have been on servers that fully integrate their forum accounts into the game.