killeryoyo Posted April 3, 2016 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
Miika Posted April 3, 2016 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
killeryoyo Posted April 3, 2016 Author 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);
Anubhav Posted April 3, 2016 Posted April 3, 2016 try this exports["notices"]:addNotification(source,"Test",255,success);
Miika Posted April 3, 2016 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
ozulus Posted April 4, 2016 Posted April 4, 2016 exports["notices"]:addNotification(source, "Test", "success");
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