SkatCh Posted August 31, 2014 Share Posted August 31, 2014 guys can anyone help me here : function getPlayerCountry ( player ) return getIpCountry ( getPlayerIP ( player ) ) <----- this line end function getIpCountry ( ip ) local ip_group = tonumber ( gettok ( ip, 1, 46 ) ) <------- This line local ip_code = ( gettok ( ip, 1, 46 ) * 16777216 ) + ( gettok ( ip, 2, 46 ) * 65536 ) + ( gettok ( ip, 3, 46 ) * 256 ) + ( gettok ( ip, 4, 46 ) ) <------ this line if ( #aCountries == 0 ) then loadIPGroups () end if ( not aCountries[ip_group] ) then aCountries[ip_group] = {} end for id, group in ipairs ( aCountries[ip_group] ) do if ( ( group.rstart <= ip_code ) and ( ip_code <= group.rend ) ) then return group.rcountry end end return false end Warning : 1- Bar argument @ 'getPlayerIP' [Excepted Element At argument 1, got nil] 2- Bar argument @ 'gettok' [Excepted String At argument 1, got boolean] 3- Bar argument @ 'gettok' [Excepted String At argument 1, got boolean] Link to comment
Saml1er Posted August 31, 2014 Share Posted August 31, 2014 Can you show use the main code where you are calling those functions? Link to comment
xXMADEXx Posted August 31, 2014 Share Posted August 31, 2014 It means, somewhere when getPlayerCountry it's sending a value that isn't equal to a player element. Link to comment
Bonsai Posted August 31, 2014 Share Posted August 31, 2014 Its not just not equal, its nil. This seems to be the admin resource. So you must have screwed up editting something. 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