Jump to content

Account Data


Spice

Recommended Posts

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
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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...