CapY Posted August 30, 2011 Posted August 30, 2011 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
JR10 Posted August 30, 2011 Posted August 30, 2011 outputConsole(getPlayerName(thePlayer).." Logged into "..getAccountName(current_account)) Seriously, not every problem you encounter you post it here, try something yourself first.
CapY Posted August 30, 2011 Author Posted August 30, 2011 I tryied already , but i didnt success , because i posted it here.
CapY Posted August 30, 2011 Author Posted August 30, 2011 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 )
50p Posted August 30, 2011 Posted August 30, 2011 There is no such event. Use onPlayerLogin. If this is your custom event then make sure you trigger it properly.
Castillo Posted August 30, 2011 Posted August 30, 2011 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 )
CapY Posted August 30, 2011 Author Posted August 30, 2011 I forgot to alert i fixed problem myself finally .
CapY Posted August 30, 2011 Author Posted August 30, 2011 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
Static-X Posted August 30, 2011 Posted August 30, 2011 Whats 'thePlayer'? Read the arguments of onPlayerLogin, thePreviousAccount,theCurrentAccount,autoLogin use 'source' instead of thePlayer at line 5
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