|
| 22 Dec 2014 12:16 AM |
Ok I found this old script, it makes teams and stuff, but it doesn't work.
Here it is:
--*--<({[Team Making Script]})>--*-- invite = "Will you accept this request to join SP's team?" --this is the text that asks the player to join the team names = "What will the name of this team be?" --This one asks for the name of the team asking = "What color of team?" --Asks for the color of the team inviteto = "Who will you invite?" --Asks who will be invited accept = "Yay you are now part of the team! :D" --If person accepted decline = "Oh thats dissapointing... :(" --If person declined D: created = "Team created..." function msgTo(pl,nm,txt,new,val) M = Instance.new("Message") M.Parent = pl M.Name = nm M.Text = txt M.Text = string.gsub(M.Text,"SP",new) cr = Instance.new("ObjectValue") cr.Value = val cr.Name = "creator" cr.Parent = M end function getTeam(pl) c = game.Teams:children() for i=1,#c do if c[i].TeamColor == pl.TeamColor then return c[i] end end return nil end function onChat(msg,speak) if speak:findFirstChild("AskCol") and getTeam(speak) ~= nil then getTeam(speak).TeamColor = BrickColor.new(msg) speak.TeamColor = BrickColor.new(msg) speak.AskCol:remove() end if speak:findFirstChild("AskName") and getTeam(speak) ~= nil then getTeam(speak).Name = msg speak.AskName:remove() end if speak:findFirstChild("AskInviteYN") and (msg == "Yes" or msg == "No") then if msg == "Yes" then speak.TeamColor = speak.AskInviteYN.creator.Value.TeamColor speak.AskInviteYN.Text = accept wait(2) speak.AskInviteYN:remove() end if msg == "No" then speak.AskInviteYN.Text = decline wait(2) speak.AskInviteYN:remove() end end if speak:findFirstChild("NewTeam") then wait(1) speak:findFirstChild("NewTeam"):remove() end if speak:findFirstChild("AskInviteTo") then play = game.Players:findFirstChild(msg) if play then msgTo(play,"AskInviteYN",invite,speak.Name,speak) speak.AskInviteTo:remove() end end if msg == "/create team/" then team = Instance.new("Team") team.Parent = game.Teams team.TeamColor = BrickColor.random() speak.TeamColor = team.TeamColor team.AutoAssignable = false msgTo(speak,"NewTeam",created,_,speak) end if msg == "/color team/" then msgTo(speak,"AskCol",asking,_,nil) end if msg == "/name team/" then msgTo(speak,"AskName",names,_,nil) end if msg == "/invite/" then msgTo(speak,"AskInviteTo",inviteto,_,nil) end end game.Players.PlayerAdded:connect(function(p) p.Chatted:connect(function(m) onChat(m,p) end) end)
Now, This line..
msgTo(speak,"NewTeam",created,_,speak)
The _ says "W001: Unknown global '_'".
Anyone have any idea on how to fix this? |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 22 Dec 2014 12:24 AM |
| It means the variable _ doesn't exist...? |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2014 12:24 AM |
@128
Yeah I know that, But if I remove it, I'm afraid it might ruin the script, I do not know what is supposed to be there. |
|
|
| Report Abuse |
|
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 22 Dec 2014 12:27 AM |
| It looks like its supposed to be a string so try replacing it with a blank string "" |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Dec 2014 12:32 AM |
| From a brief overlook, it seems like _ is a TODO. You will need to fill this in with a value. Being _ was never declared as a value, it will try _G kinda stuff - which doesn't work - it seems. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2014 12:34 AM |
| On that note, you might want to define everything more spaced away from eachother (legible if you will). Also, take note of what's local and global. All of your variables are global which can get a little crazy when your defining things. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2014 12:34 AM |
I just tried "", It worked for creating more teams.
But how will I create a team, I'm not good at reading strings and seeing on how to make a team.
/create team/ makes a team with random color
but how will I use /color team/ and /name team/? |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2014 12:36 AM |
Both "" and _G Work
but I just need help with understanding /color team/ and /name team/ |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2014 12:38 AM |
| Instead of immediately implementing the team with /create team/, make a /finish team/ or a /publish team/. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2014 12:40 AM |
@cody
This script is actually backwards to that. You must first create the team, then edit it with those. I've used this script back in the old days in stickmasterluke's Insta-gib Laser tag. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2014 12:46 AM |
| How do I name the team with the /name team/? |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2014 12:50 AM |
| You can't. It's not implemented. YOU will have to code the innards. All you need to do is change the team's name. I would make my variables local and create a state of editing a selected team. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2014 12:52 AM |
@cody
I could make a team creator, but I won't know how to make a invite system. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2014 03:04 AM |
| Dude! Why are you typing lua to make teams? Just go into advanced items or whatever and insert a team! Change the name and obviously Puck a color! |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2014 01:27 PM |
@fua
That's not what this script does, this script allows the player [ingame] to create their own name by customization, colors and naming, the player can also invite any other players. |
|
|
| Report Abuse |
|
|