![]() |
chat.substring?
i was wonderng, how does this work? i do tons of scripting, and yet if i come across a chat.substring i give one of my friends the script so they fix it, but i wanna find out how to do it myself.
|
It uses everything in the player's chat or w.e after the number in ().
Example: PHP Code:
Atleast, I think so. |
Uh, trim() is a function not a variable. Also substring() can be used two ways, the first being like you said.
variable.substring(index); The index being the index of the character you want to start the substring at. The second way being: variable.substring(index, length); Length is the amount of characters after the index that you want included in the substring, you can use a length of -1 for all characters. "abcdefghi".substring(4) == "efghi"; "abcdefghi".substring(4, -1) == "efghi"; "abcdefghi".substring(3, 3) = "def"; |
| All times are GMT +2. The time now is 05:39 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.