SetSignLines does not work
#12
In API: SetSignLines(BlockX,BlockY,BlockZ,Line1,Line2,Line3,Line4,Player)
if isset "Player" then i get error "to many arguments".
if there is no "player", the function works fine, but my another function not work...

if i place sign with "[stats]" in first line, all work, but i klick on sign, function "OnSignUpdate" not getting "Player" and send error.
if i added "Player" in function "SetSignLines", i get error "to many arguments" in function "SetSignLines"...
How do?

my code:
Code:
function OnSignUpdate(World, BlockX, BlockY, BlockZ, Line1, Line2, Line3, Line4, Player) if(string.find(string.lower(Line1),'%[stats%]') ~= nil)then local Statistics = Player:GetStatistics() local mobKills = Statistics.Custom[CustomStatistic.MobKills] return false, Line1, Player:GetName(), mobKills , Line4 end end function OnPlayerRightClick(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, CursorY, CursorZ) local World = Player:GetWorld() if(World:GetBlock(Vector3i(BlockX, BlockY, BlockZ)) == E_BLOCK_WALLSIGN)then local IsValid, Line1, Line2, Line3, Line4 = World:GetSignLines(BlockX, BlockY, BlockZ) if(string.find(string.lower(Line1),'%[stats%]') ~= nil)then local Statistics = Player:GetStatistics() local mobKills = Statistics.Custom[CustomStatistic.MobKills] World:SetSignLines(BlockX, BlockY, BlockZ, Line1, Line2, mobKills, Line4) end end return false end
Reply
Thanks given by:


Messages In This Thread
SetSignLines does not work - by nixi - 01-16-2016, 12:37 AM
RE: SetSignLines does not work - by NiLSPACE - 01-16-2016, 01:23 AM
RE: SetSignLines does not work - by nixi - 01-16-2016, 02:21 AM
RE: SetSignLines does not work - by ThuGie - 01-16-2016, 03:21 AM
RE: SetSignLines does not work - by nixi - 01-16-2016, 04:08 AM
RE: SetSignLines does not work - by NiLSPACE - 01-16-2016, 04:06 AM
RE: SetSignLines does not work - by xoft - 01-16-2016, 06:54 AM
RE: SetSignLines does not work - by xoft - 01-16-2016, 06:54 AM
RE: SetSignLines does not work - by nixi - 01-21-2016, 03:52 AM
RE: SetSignLines does not work - by Seadragon91 - 01-16-2016, 07:32 AM
RE: SetSignLines does not work - by xoft - 01-16-2016, 07:59 AM
RE: SetSignLines does not work - by Dredd - 03-16-2025, 10:36 PM



Users browsing this thread: 1 Guest(s)