Jump to content

Bad "Client" Pointer Problem


ArmedGuy

Recommended Posts

Posted

Yeah, so when someone logs in to their account i want to retrive their name/account name, but if i use this code:

function onPlayerJoin ( source )
if ( saveFile ) then
local sourcename = getClientName( source )
 
addEventHandler("onClientLogin", getRootElement(), onPlayerJoin)

i get this error:

ERROR: Line Blabla: Bad "Client" Pointer @ getClientName

anyone know why?

Posted

onClientLogin parameters are different from parameter in your script. Never put 'source' into parameters list for events.

Posted
function onPlayerJoin ()
if ( saveFile ) then
local playerName = getClientName( source )
 
addEventHandler("onClientLogin", getRootElement(), onPlayerJoin)

this should works

Posted
There are two ends missing there...

I guess he just posted a piece of his code. If he has error:

ERROR: Line Blabla: Bad "Client" Pointer @ getClientName

That means the script has ran but failed when calling getClientName. When you forget about ends you get unexpected symbol near ''.

Posted
Yeah, Its just a piece, but anyone want the whole code to try finding whats wrong? As i seriously cant find any problem.

Did you saw the post of DaK?

Posted

Sorry for bumping, but, does the skin and money of a player get reset if you use the command spawnPlayer? as the script(which is a playerstats script loads the data sucessfully, also when the screens faded out, but then when i use a inbuilt command, /spawn, it goes back to regular CJ and no money

Posted

so make it when you do /spawn, make it so i will get playerskin and save it as a variable, and do the same for the money. Then make it so when player spawns, it will load the skin and the money

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