-
Rintintin
- Posts: 55
- Joined: Tue Jan 01, 2013 7:45 am
- Location: Germany
#1
Post
by Rintintin » Tue May 04, 2021 4:14 am
As meentioned on
https://www.solarstrike.net/wiki/index. ... _Functions
there should be a function to update the buffs of a player or target. But this does not work (anymore)
Code: Select all
for k,v in pairs (player.Buffs) do
if v.Id ~= 503827 then goto continue end
print (v.Name.." "..v.Count)
::continue::
end
This code will return the desired buffs but no updates afterwards.
-
Administrator
- Site Admin
- Posts: 5329
- Joined: Sat Jan 05, 2008 4:21 pm
#2
Post
by Administrator » Wed May 05, 2021 11:08 am
You may need to call
first. I'm not sure exactly what you are attempting to do, so I think that function isn't automatically called for you in your circumstances.
That would look something like...
Code: Select all
player.updateBuffs()
for k,v in pairs (player.Buffs) do
if v.Id ~= 503827 then goto continue end
print (v.Name.." "..v.Count)
::continue::
end
-
Rintintin
- Posts: 55
- Joined: Tue Jan 01, 2013 7:45 am
- Location: Germany
#3
Post
by Rintintin » Tue May 11, 2021 10:07 am
Well I tried the command from the commandline but it threw an error
Code: Select all
player.updateBuffs()
onLoad error: D:/rombot/scripts/rom/classes/pawn.lua:429: attempt to index local 'self' (a nil value)
-
Administrator
- Site Admin
- Posts: 5329
- Joined: Sat Jan 05, 2008 4:21 pm
#4
Post
by Administrator » Tue May 11, 2021 10:33 am
Sorry, my mistake. That should have been a colon (:) instead of dot (.):
-
Rintintin
- Posts: 55
- Joined: Tue Jan 01, 2013 7:45 am
- Location: Germany
#5
Post
by Rintintin » Wed May 12, 2021 2:57 pm
Oh yes, that does the trick and seems to work.
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests