-
Posted by deltoide on Fri, 02 Dec 2011 09:53:06
Friends, I wrote this script but I believe I have committed any fault
for i=1,GetNumGuildMembers()do local ,,a,b=GetGuildRosterInfo(i)if GetGuildRosterContribution(i) >= 2763580 and GetGuildRosterInfo(Name) ~= "Raptis" then SetGuildMemberRank(i,3)end end
any error in this code?
-
Posted by jnwhiteh on Fri, 02 Dec 2011 14:23:14
Yes, there's a syntax error (which you putting it into any capable Lua editor/window would have revealed).
This is a syntax error:
local ,,a,b=GetGuildRosterInfo(i ...
You can't just have , in wherever you want them.
-
Posted by deltoide on Sat, 03 Dec 2011 10:10:18
not understand
-
Posted by jnwhiteh on Sun, 04 Dec 2011 00:16:09
I don't know how to make it any clearer. You are getting a Lua syntax error, which you failed to post here. That describes exactly what the problem is. You can't just have commas sitting after local.. I'm not even sure what you're trying to do there. Perhaps:
local ,,a,b
-
Posted by deltoide on Sun, 04 Dec 2011 08:09:39
What I am trying to make is that this "macro" to enable all members with more than 2763580 of the weekly activity guild rank "3", except the player or save Raptis ranks "2" and "4".
-
Posted by jnwhiteh on Sun, 04 Dec 2011 12:35:48
Your code makes no sense, and you're not helping me at all. Maybe try:
for i=1,GetNumGuildMembers() do local name=GetGuildRosterInfo(); if GetGuildRosterContribution(i) >= 2763580 and name ~= "Raptis" then SetGuildMemberRank(i,3)end end
I have no clue, I can't write the macro for you, and you have basic syntax errors.
-
Posted by deltoide on Mon, 05 Dec 2011 09:11:02
Thanks for the help friend.
As I have put this command
for i=1,GetNumGuildMembers() do local y,m,d=GetGuildRosterLastOnline(i) print((GetGuildRosterInfo(i)),y,m,d) if y then if y>0 or m>0 or d>28 then GuildUninvite(GetGuildRosterInfo(i)) end end end
To run as soon as I upload my addon? (get into the game)
-
Posted by deltoide on Thu, 08 Dec 2011 09:36:25
have any suggestions on how do I run this command as soon as I enter the game with the addon loaded?
-
Posted by jnwhiteh on Fri, 09 Dec 2011 09:34:41
You write an addon. I don't know when the guild roster information is available. You'll have to use events. You don't own my book, and I don't have the time to teach you something that is already covered quite clearly in the book.