With a simple say verb, with ex. msg as text, how would I go extracting the sentence they entered, and shuffle the words? Also, leave out some letters, or replace them?
Thanks in advance
ID:167515
Mar 3 2006, 4:05 am
|
|
Mar 3 2006, 5:49 am
|
|
In response to CIB
|
|
Augh. No. You do not need a list for this, and moreover the only thing worse than your heinous use of goto where it is totally wrong here is that you're only using one space in place of a tab. Use two spaces per tab at least, and do not use goto, because you haven't yet learned when not to.
To scramble a word, there is a much simpler method, which does not involve bogus or badly formatted code. proc/Scramble(txt) Lummox JR |
In response to Lummox JR
|
|
Lummox JR contributed:
proc/Scramble(txt) I'll add a little to this, since you mentioned leaving out or substituting letters. proc/Scramble(txt) If course, you could change all the numbers and effects to suit the flavor of your ideal scrambler. Have fun with it! |
In response to PirateHead
|
|
Thanks a bunch all!
|
In response to Lummox JR
|
|
Err, this is sort of off-topic, but instead of opening a new post, I will just ask here.
What is . used for? The reference says if nothing is returned it returns . which is usually null. By setting it, does that mean that it returns whatever you set . to? Are there any pros and cons to using this as opposed to just setting a var then returning that var? -Doh |
In response to XxDohxX
|
|
Yes, that is what it does.
proc/MyProc() That is the same as the following. proc/MyProc() Think of the most common example where you see it used: when calling a default function action. mob/Move() mob/Move returns 1 on success and 0 on failure. Many people do just ..() in mob/Move instead of .=..(), and technically that means their Move function isn't doing its full job. I have had bugs crop up before because I accidently did only ..(). As for the pros and cons, not exactly. Making a var/return_value, manipulating that instead, and then returning that at the very end will result in the exact same thing. Doing the following is just as fine as using the return value variable. mob/Move() However, if you ever see code snippets made by me, a function like that would have "." where you see ret there. |
In response to Loduwijk
|
|
Ahh I see, thanks for explaining that some. I've always wondered what that dot was before in your programming that you've showed.
-Doh |