Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[Error] Why would this be erroring?

Asked by 10 years ago

Like I dont understand why this is erroring it shouldnt be. PLR (attempt to call a nil value 'Plr')

function TH(Txt,Func)
for _,v in pairs(game.Players:GetPlayers()) do
if GetRanking(v)>5 then
Tablet(v,Txt,function()
Func=Func
Func()
end)
end
end
end


Cmd(0,'Get Ranked Up','GR','GetRanked From A High Ranking Player(System)','<returns Service value>',function(Owner)
Tablet(Owner,'Ask A Admin-Creater For A Rank',function()
TH(Owner.Name..' Asks For A Rank Up (Click To Rank)',function(Plr)
for i=0,6,1 do
Tablet(Owner,'Rank '..i,function() 
table.insert(V3.GRanks,{NAME=Owner.Name,RANK=i,COLOR='White',CHAT=true,TTab=false;})
Tablet(Owner,Plr.Name..' Has Ranked You '..i,function() end)
Tablet(Owner,'Say thank you to '..Plr.Name..'?',function() 
Tablet(Owner,Owner.Name..' Says Thank You For The Rank',function() end)
end)
end)
end
end)
end)
0
Can you include the full error message, verbatim? What does `TH` do? What is the `PLR` parameter? A Character object? Using pcall is definitely **not** the right answer when you're running into a bug. Fix the underlying problem instead. BlueTaslem 18071 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

It might be because pcall() isn't made to handle yielding, so :WaitFirstChild() did nothing.

Ad

Answer this question