200ABJoin Date: 2010-08-24 Post Count: 1604 |
Yeah, like title says, I'm trying to make a command to create a new Team, it works excellent, the only problem is that when it comes to the part for putting in the TeamColor, no matter what color the person says, the team always pops up with default color, Medium Stone Brown or something I think.
Been messing with it for days now, and I just can't figure it out.
Here's the line of code that is messed up:(
newTeam.TeamColor = BrickColor.new(string.sub(msg,thanum))
)
And if it's needed, i'll put the var used with i (thanum), it was used this time to find the amount of characters thats used for the Team name, in between the start of command (maketeam/) and whats after the second / that begins the team color. (maketeam/TeamNameGoesHere/TeamColorGoesHere) Ex: maketeam/200ABTeam/Really red
heres thanum/i:(
for i =10,100 do
(other stuff inbetween but i'm just putting i & thanum)
thanum = i
)
So like i said, the command works. It creates the team with the Team name that was said, and it all works good, but the ONLY thing that wont work is when stating the TeamColor, it's not because its not said right, like reallyred instead of Really red or new Yeller instead of New Yeller , nothing like that, it has something to do with BrickColor.new that I messed up on.
Thanks in advance anyone who helps! |
|
|
that thanum would make 90 different teams, unless you're breaking the loop at a random time. Do you want to make a team with the teamcolor of the command? or a random teamcolor? |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
It breaks the loop. Like I said, I am not showing any of the extra stuff, just the things I see someone may need.
Anyway, if you read what I said, I want it to make the team with the team color that the person who said the command said, ex, if the person said: maketeam/LolTeam/New Yeller it would make a team with the name LolTeam & the color New Yeller. Everything works but the team color part. |
|
|
well we would probably have to see the part that figures out what team color it is. |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
i know you're trying to help, and I'm very greatful, don't get me wrong, but please read what I said in my thread.
newTeam.TeamColor = BrickColor.new(string.sub(msg,thanum))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
That part(if it worked) would check what the person said, and start looking for the part directly after maketeam/TheTeamName/
Right after the second / it would copy the words & use them for the color, like New Yeller, or Really red |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
bump |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
bump~~ |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
Bummmpppp |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
Bumpbumpbumpbumpbumpbump |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
BUMMMMMP. :/ |
|
|
Please stop bumping this forum, its considered spamming. If no one answers then that means ether its to hard, its not possible, or people jsut done know.
-happyboy (Causing hell since 1995) |
|
|
I thought AFF was on... ._. |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
Excuse me, but the point of bumping is to be used when your post goes far down the page(s).
Spam is something that is completely useless to everyone & is posted multiple times in a forum or forums.
I do not think that's what I'm doing. And if I need a answer, aslong as I don't flood the forum & post every 10-15secs, I have every right to keep bumping my post. |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
Bump....
Probably my last bump for awhile.
Again, thanks to anyone whos attempted to help me & hopefully someone will fix this problem. |
|
AgentFirefoxTop 100 PosterJoin Date: 2008-06-20 Post Count: 22404 |
Really? for i = 10, 100 do
WHY use that junk? Just use the simple string.find() instead of iterating through 90 numbers to look for the space...
-____________-
@crazy
I had to help backfill the driveway. Got a new concrete drive over the summer. ^_< |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
To me this way is simpler.
Anyway, can anyone help with the problem i made this thread because of? |
|
|
Im making a make team command as well! I have found that it is a little to advanced for me to make alone. I cant make the color part...
Heres what i have:
if (string.sub(msg,1,9) == "maketeam/") then
name = string.sub(msg,10)
t = Instance.new("Team", game.Teams)
t.Name = name
end
end |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
Bump.... |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
Bump...! |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
Bummppp.... |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
ugh...bump. |
|
|
...thanum is a string...
C=BrickColor.new(tonumber(string.sub(msg, thanum))) |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
No...really?!
Lol wow...
You do relize that BrickColor.new() can also be a STRING right? And you would have known I knew that & was trying to get it where they say color, and it makesa the TeamColor that color if you actually read any posts made in this thread.
Thanks for trying anyway. |
|
300ABJoin Date: 2010-03-23 Post Count: 512 |
hi bro =D |
|
200ABJoin Date: 2010-08-24 Post Count: 1604 |
bump |
|