Jump to content

Function


CapY

Recommended Posts

function outputOnLogin (thePlayer, current_account ) 
    outputConsole(getPlayerName(thePlayer)).." Logged into "..getAccountName(current_account))  
end 
addEventHandler("onClientLogin",getRootElement(),outputOnLogin )  

Error : unexpected symbol near '..' in first line

Link to comment

Hmm .. no errors on debug , but still alert is not displayed in the chatbox a when player logins.

function outputOnLogin (thePlayer, current_account ) --when a player logs in 
    outputChatBox(getPlayerName(thePlayer).." Logged into "..getAccountName(current_account),getRootElement(),255,0,0, true) 
end 
addEventHandler("onClientLogin",getRootElement(),outputOnLogin )  

Link to comment

Maybe because is onPlayerLogin not onClientLogin?

function outputOnLogin (thePlayer, current_account ) --when a player logs in 
    outputChatBox(getPlayerName(thePlayer).." Logged into "..getAccountName(current_account),getRootElement(),255,0,0, true) 
end 
addEventHandler("onPlayerLogin",getRootElement(),outputOnLogin )  

Link to comment

Bump*

I've never seen that error and then i dont know how to fix it.

local root = getRootElement() 
  
addEventHandler("onPlayerLogin", root, 
  function(thePlayer,current_account) 
  outputChatBox(getPlayerName(thePlayer).." has logged into"..getAccountName(current_account), root,255,0,0, true) 
  end) 

attempt to concatenate a boolean value  

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