killeryoyo Posted April 3, 2016 Share Posted April 3, 2016 Hello people, i tried to launch a script today and found that error and can't solve it till now D:. Bad Arguement @ TriggerClientEvent [ Expected Element @ Arguement 2, got string ["addnotficiation"] in Line 3 function addNotification(player, text, type) if (player and text and type) then triggerClientEvent(player, 'addNotification', player, text, type); end end Link to comment
Miika Posted April 3, 2016 Share Posted April 3, 2016 Test it. function addNotification(thePlayer, text, _type) if (thePlayer and text and _type) then triggerClientEvent(player, 'addNotification', thePlayer, text, _type); end end Link to comment
killeryoyo Posted April 3, 2016 Author Share Posted April 3, 2016 same error but its written with Arguement 1 not 2. I used this export exports["notices"]:addNotification("Test",source,255,success); Link to comment
Anubhav Posted April 3, 2016 Share Posted April 3, 2016 try this exports["notices"]:addNotification(source,"Test",255,success); Link to comment
Miika Posted April 3, 2016 Share Posted April 3, 2016 I forgot one thing from script, try this: function addNotification(thePlayer, text, _type) if (thePlayer and text and _type) then triggerClientEvent(thePlayer, 'addNotification', thePlayer, text, _type); end end Link to comment
ozulus Posted April 4, 2016 Share Posted April 4, 2016 exports["notices"]:addNotification(source, "Test", "success"); Link to comment
killeryoyo Posted April 4, 2016 Author Share Posted April 4, 2016 Works! thank you so Much all who helped Link to comment
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