Jump to content

help script


Death

Recommended Posts

Posted (edited)

bad argument at getPlayerName target

WARNING: gameid\gameid.lua:1320: Bad argument @ 'getPlayerName' [Expected element at argument 1]

Edited by Guest
Posted

Yes, I can read what he said, but that script he posted doesn't has 1320 lines, it has 38, so my question is obvious, which line in that script corresponds to the line 1320 from the whole script?

Posted

The problem is that you are kicking the player before output the message, so the element no longer exists, you must switch it, like this:

outputChatBox( 'The player '..getPlayerName( target )..' ('..id..') was kicked by admin '..getPlayerName( player )..' ('..getPlayerID( player ) or '???'..')receive 3 warnings (reason: '..reason..')', root, 0, 255, 255 ) 
kickPlayer( target, player, reason ); 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...