| 09-19-2003, 12:22 AM | #1 |
how do you use the (Substring((Entered chat string), 1, 5)) Equal to .... what are the bold numbers for? i want it so that when a player types -play music #, and the number is equel to 1 it plays music #1 (which i conveniently named 1) and when a player types -play music 2 it playes the second song, and i dont want to make 2 triggers :bgrun: |
| 09-19-2003, 12:54 AM | #2 |
The bold numbers indicate the position of the first and last character of the substring. In your case, (Substring(EnteredChatString),12,12) should do the trick. It returns the character in the 12th position of the string (as as string), and that's where your number (1,2 etc.) is located in the chat string if used correctly. - Unless I miscounted, you'd better check :) Greetings, Malleus |
| 09-19-2003, 01:07 AM | #3 |
oooooooh i get it so if you wanted say... a 3 deigit number it would be (Substring(EnteredChatString),12,15)? i guess that makes sense |
