001 Posted May 5, 2017 Posted May 5, 2017 WARNING: ***/client.lua:3" Bad argument @ 'outputChatBox' [Expected number at argument2,got player]
^iiEcoo'x_) Posted May 5, 2017 Posted May 5, 2017 (edited) bool outputChatBox ( string text [, int r=231, int g=217, int b=176, bool colorCoded=false ] ) ًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًزًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًًً Edited May 5, 2017 by #_iMr.[E]coo - Hashemite Kingdom Of Jordan -
001 Posted May 5, 2017 Author Posted May 5, 2017 addEventHandler( "onClientPlayerSpawn" , getRootElement (), function () outputChatBox( getPlayerName(source).." Has Spawned ", source) end ) its my first script
pa3ck Posted May 5, 2017 Posted May 5, 2017 That is because on client side you don't specify a player element. Remove source after the comma.
^iiEcoo'x_) Posted May 6, 2017 Posted May 6, 2017 addEventHandler ( 'onClientPlayerSpawn' , root , function ( ) outputChatBox ( getPlayerName ( source ) .. ' Spawn ! ' ) end ) - Hashemite Kingdom Of Jordan -
001 Posted May 6, 2017 Author Posted May 6, 2017 1 hour ago, #_iMr.[E]coo said: addEventHandler ( 'onClientPlayerSpawn' , root , function ( ) outputChatBox ( getPlayerName ( source ) .. ' Spawn ! ' ) end ) i've to leave space between getPlayerName and ( source ) ?
^iiEcoo'x_) Posted May 6, 2017 Posted May 6, 2017 Source The source of this event is the player that spawned. - Hashemite Kingdom Of Jordan -
pa3ck Posted May 6, 2017 Posted May 6, 2017 No the space between brackets doesn't make any difference (source) and ( source ) is exactly the same, the code is a bit easier to look at with spaces.
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