• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

isPlayerNamelocked error

Delirium

OTLand veteran
Staff member
Global Moderator
Joined
May 28, 2007
Messages
3,365
Solutions
1
Reaction score
289
Location
Athens, Greece
Hello.

I'm trying to make a new mod for tfs 0.3.5 but when executing a part of the code I get "[14/08/2009 14:49:48] [string "loadBuffer"]:29: attempt to call global 'isPlayerNamelocked' (a nil value)".

The part of the code is:

Lua:
local target = getCreatureByName(t[1])
if not isPlayerNamelocked(getCreatureName(target)) then

Anyone knows how to fix this? Thanks in advance.
 
Try with this debuger:
Code:
local target = getCreatureByName(t[1])
if (not target) then
	print("target not found.")
	return true
end

if (not isPlayerNamelocked(getCreatureName(target))) then
	do smth.
end
If you'll see in console "target not found." then it's problem with t[1] :)
 
Try with this debuger:
Code:
local target = getCreatureByName(t[1])
if (not target) then
	print("target not found.")
	return true
end

if (not isPlayerNamelocked(getCreatureName(target))) then
	do smth.
end
If you'll see in console "target not found." then it's problem with t[1] :)

[14/08/2009 16:11:00] [string "loadBuffer"]:12: attempt to call global 'isPlayerNamelocked' (a nil value)

not a problem with t[1] :p

@up still not working :p
 
Back
Top