Spice Posted July 2, 2015 Share Posted July 2, 2015 NOTE : This is the part of script which not working setAccountData ( Acc, "Team", getPlayerTeam (source)) local Team = getAccountData (acc, "Team") setPlayerTeam (source, Team) The debugs says that i can't use string at the second argument of setPlayerTeam, how to fix that ? Link to comment
Gr0x Posted July 2, 2015 Share Posted July 2, 2015 I'm going to assume that you set the "Team" data as a string for the team name. Try this. local Team = getTeamFromName(getAccountData (acc, "Team")) setPlayerTeam (source, Team) Link to comment
Spice Posted July 2, 2015 Author Share Posted July 2, 2015 I'm going to assume that you set the "Team" data as a string for the team name.Try this. local Team = getTeamFromName(getAccountData (acc, "Team")) setPlayerTeam (source, Team) [11:50:48] WARNING: LogSave\server.lua:84: Bad argument @ 'getTeamFromName' [Exp ected string at argument 1, got boolean] Link to comment
Death Posted July 2, 2015 Share Posted July 2, 2015 try this setAccountData ( Acc, "Team", getTeamName(getPlayerTeam (source))) local Team = getAccountData (acc, "Team") setPlayerTeam (source, Team) Link to comment
Spice Posted July 2, 2015 Author Share Posted July 2, 2015 try this setAccountData ( Acc, "Team", getTeamName(getPlayerTeam (source))) local Team = getAccountData (acc, "Team") setPlayerTeam (source, Team) [13:17:08] WARNING: Logsaver\server.lua:114: Bad argument @ 'setPlayerTeam' [Exp ected team at argument 2, got string 'Staff'] Link to comment
Death Posted July 3, 2015 Share Posted July 3, 2015 try this setAccountData ( Acc, "Team", getTeamName(getPlayerTeam (source))) local Team = getTeamFromName(getAccountData (acc, "Team")) setPlayerTeam (source, Team) Link to comment
Spice Posted July 3, 2015 Author Share Posted July 3, 2015 try this setAccountData ( Acc, "Team", getTeamName(getPlayerTeam (source))) local Team = getTeamFromName(getAccountData (acc, "Team")) setPlayerTeam (source, Team) working, thanks Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now