Raised This Month: $ Target: $400
 0% 

[ Solved ]switch string


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 01-09-2015 , 13:53   Re: switch string
Reply With Quote #1

Dude, I haven't insulted you in anyway.
If you test it yourself you would have had the result. Should it be a success, you got for yourself a solution. If no, you can post what you have done and others can help you with an appropriate and efficient way to solve your problem. You win in anyway and definitely faster than just waiting for someone to answer your random question.
So stop being a dick and start testing.
RateX is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 01-09-2015 , 16:25   Re: switch string
Reply With Quote #2

If you wan't to help just post it i will be appreciated . but if its out of the object just leave .
Because you don't help me at all .


Thanks ,

[ Solved using enumeration ] .
Freezo Begin is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-09-2015 , 18:25   Re: [ Solved ]switch string
Reply With Quote #3

An enum doesn't satisfy what you are requesting in post #3. However, the best you could do is use a Trie to get an integer (that is associated with the input string) to use in your switch.

Based on the purpose of the code in post #1, you should be using integers or enums anyways. I'm glad you found the answer.

All 'good' scripters try stuff on their own before asking "will this work" unless it's extremely complicated.
__________________

Last edited by fysiks; 01-09-2015 at 18:27.
fysiks is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode