Jump to content

small warning in console


zombienation

Recommended Posts

Well , i think you are to lazy to look out the error

  
[2012-02-05 13:57:17] WARNING: zombiegamemode\teamjobs.lua:256: Bad argument @ 'getPlayerTeam' 

Here : 'teamjobs.lua:256:' that means that it isn't his full code , but i don't think he has anyreason to post here the whole code

@Zombienation Here is a little lection

If you use it in clientside

  
function createTeam() 
local team = getPlayerTeam(localPlayer) 
if team then 
return team 
else 
return N/A 
end 
end 

If you want to use it in serverside

  
--clientside 
function sendInformation() 
local thePlayer = getLocalPlayer() 
triggerServerEvent("getInformation", localPlayer , thePlayer) 
end 
  
--serverside 
function getTheInformation() 
getPlayerTeam( thePlayer ) 
end 
addEvent ( "getInformation", true ) 
addEventHandler ( "getInformation", getRootElement(), getTheInformation ) 

OR You can try NVIDIAS way :)

Link to comment
Well , i think you are to lazy to look out the error

  
[2012-02-05 13:57:17] WARNING: zombiegamemode\teamjobs.lua:256: Bad argument @ 'getPlayerTeam' 

Here : 'teamjobs.lua:256:' that means that it isn't his full code , but i don't think he has anyreason to post here the whole code

@Zombienation Here is a little lection

If you use it in clientside

  
function createTeam() 
local team = getPlayerTeam(localPlayer) 
if team then 
return team 
else 
return N/A 
end 
end 

If you want to use it in serverside

  
--clientside 
function sendInformation() 
local thePlayer = getLocalPlayer() 
triggerServerEvent("getInformation", localPlayer , thePlayer) 
end 
  
--serverside 
function getTheInformation() 
getPlayerTeam( thePlayer ) 
end 
addEvent ( "getInformation", true ) 
addEventHandler ( "getInformation", getRootElement(), getTheInformation ) 

OR You can try NVIDIAS way :)

hey ganja..

i got it to work :D lol

but, is it possible to add a code in it that saves the skin when a player dies? :)

thx

thanks

Link to comment
Well , i think you are to lazy to look out the error

  
[2012-02-05 13:57:17] WARNING: zombiegamemode\teamjobs.lua:256: Bad argument @ 'getPlayerTeam' 

Here : 'teamjobs.lua:256:' that means that it isn't his full code , but i don't think he has anyreason to post here the whole code

@Zombienation Here is a little lection

If you use it in clientside

  
function createTeam() 
local team = getPlayerTeam(localPlayer) 
if team then 
return team 
else 
return N/A 
end 
end 

If you want to use it in serverside

  
--clientside 
function sendInformation() 
local thePlayer = getLocalPlayer() 
triggerServerEvent("getInformation", localPlayer , thePlayer) 
end 
  
--serverside 
function getTheInformation() 
getPlayerTeam( thePlayer ) 
end 
addEvent ( "getInformation", true ) 
addEventHandler ( "getInformation", getRootElement(), getTheInformation ) 

OR You can try NVIDIAS way :)

And you are too lazy to see that I said "Post the whole code".

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