You are not logged in.

Applications: [GameMaster: OPEN] | [Volunteer Testers: OPEN]


This forum will be permanently shut down on Friday 13.07.2018
Please copy or save all important information from old forum before they will be deactivated
We have moved to new board. https://forum.runesofmagic.gameforge.com/Come join us.

1

Monday, July 9th 2012, 2:39am

DIYCE S/Wd Help

I'm having trouble with DIYCE for s/wd. Here's the code in myfunctions.lau :

function ScoutWarden(arg1)
local Skill = {}
local i = 0
local enemy = UnitCanAttack("player","target")
local mana = UnitSkill("player")
local focus = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local targetAlive = (not UnitIsDeadOrGhost("target"))
local pvp = ((not friendly) and (UnitIsPlayer("target")))
local combat = GetPlayerCombatState()
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
i=i+1; Skill = { ['name'] = "Frost Arrow", ['use'] = (not string.find(pbuffs,"Frost Arrow")) }
i=i+1; Skill[i] = { ['name'] = "Briar Shield", ['use'] = (not string.find(pbuffs,"Briar Shield")) }
i=i+1; Skill[i] = { ['name'] = "Entling Offering", ['use'] = (not string.find(pbuffs,"Entling Offering")) }


if enemy then
i=i+1; Skill[i] = { name = "Snipe", use = (string.find(pbuffs, "Hidden Peril"))}
i=i+1; Skill[i] = { name = "Combo Shot", use = true }
i=i+1; Skill[i] = { name = "Autoshot", use = (not ASon) }
i=i+1; Skill[i] = { name = "Thorn Arrow", use = true }
i=i+1; Skill[i] = { name = "Reflected Shot", use = true }
i=i+1; Skill[i] = { name = "Hidden Peril", use = (focus >=30) }
i=i+1; Skill[i] = { name = "Shoot", use = true }
--i=i+1; Skill[i] = { name = "Charged Chop", use = true }
i=i+1; Skill[i] = { name = "Vampire Arrows", use = (focus >=20) }
i=i+1; Skill[i] = { name = "Piercing Arrow", use = true }
i=i+1; Skill[i] = { name = "Snipe", use = true }
i=i+1; Skill[i] = { name = "Wind Arrows", use = (focus >=55) }
end
MyCombat(Skill,arg1)
end

I keep getting this error: [string 'ScoutWarden(arg1)']:1: attempt to call global 'ScoutWarden' (a nil value)

My macro in game looks like this: /run ScoutWarden(arg1)

What am I doing wrong?

2

Monday, July 9th 2012, 5:56pm

Quoted from "RJKoubaka;544162"



My macro in game looks like this: /run ScoutWarden(arg1)

What am I doing wrong?


i just used this. for the macro in game only put /run ScoutWarden()

hope this helps :)
Govinda - Bteam
Duvalier M/W/K/R/P/S
Bazzinga WL/CH/M/W/R/P
:beer:

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

3

Tuesday, July 10th 2012, 6:44pm

Though what KingNothing (sorry, but I refuse to go through keyboard gymnastics just to type your name) mentioned is technically correct, there is something else going on here.

Oh and please use code tags when posting code to the forums otherwise we get a mess like the above. To find out about code tags and other types of tags you can use (though some have been disabled), click the words BB Code in the Posting Permissions box at the bottom of this and any other thread.

Quoted from "RJKoubaka;544162"


I keep getting this error: [string 'ScoutWarden(arg1)']:1: attempt to call global 'ScoutWarden' (a nil value)

This error message is typically caused by some kind of typo or some other error in the code which makes Lua unable to compile and therefore load you file. What Lua is telling you is that it has no clue what ScoutWarden is (when Lua doesn't know something, it assumes the value of that something is nil, hence the error).

Therefore your first stop is to go over the code and make sure that there are no glaring mistakes. I didn't see any myself, but not having the code tags makes the code harder to read so I may have missed something (you may also be interested in this guide).

Quoted from "RJKoubaka;544162"

I'm having trouble with DIYCE for s/wd. Here's the code in myfunctions.lau

At first I assumed that you misspelt the name of the file on this post, but if it really is called that, then that may be the source of the problem and not the code itself. Make sure the file is called myfunction.lua (note the file extension).
2013... The year from hell....