FORDIR_Max Posted February 27, 2022 Share Posted February 27, 2022 (edited) Hello everyone! Faced whith problem in the script. The script: function jailPort() setTimer(function(source) setElementDimension(source, 0) setElementInterior(source, 0) setElementPosition(source, -676, 2609, -20.5) setElementHealth(source, 800) end, 7000,1) end function tpPlayerZ(source) local nameOut = getPlayerName(source) local listGet = aclGetGroup("Zeck") local grouplist = aclGroupListObjects(listGet) if isObjectInACLGroup("user."..nameOut,listGet) then jailPort() end end addEventHandler("onPlayerWasted",root,tpPlayerZ) The error: [22-02-27 08:11:51] WARNING: [gameplay]/medAdnVoen/server.lua:95: Bad argument @ 'getPlayerName' [Expected element at argument 1, got number '0'] [22-02-27 08:11:51] ERROR: [gameplay]/medAdnVoen/server.lua:98: attempt to concatenate local 'nameOut' (a boolean value) I found the error, but i don not know to the fix. PS. Sorry to the my english. I from Russia. Rus moderator offline 2 days old. I m writing you. I think, will you help me. Thanks! Edited February 27, 2022 by FORDIR_Max Link to comment
Mkl Posted February 27, 2022 Share Posted February 27, 2022 (edited) Should be function tpPlayerZ() Without source. You are overwriting the predefined source variable of the event with totalAmmo, first paramater of onPlayerWasted. Edited February 27, 2022 by Mkl 1 Link to comment
FORDIR_Max Posted February 28, 2022 Author Share Posted February 28, 2022 Thanks you. 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