Page 1 of 1
help with syntax
Posted: Sun Jan 29, 2012 5:58 pm
by jdawg78
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="NORMAL">
<!-- # 1 --><waypoint x="6350" z="4620" y="168">
if inventory:itemTotalCount("stuff im farming") > 594 then sendMacro("UseSkill(1,2)"); yrest(30000); loadPaths("mailbox.xml") end
</waypoint>
<!-- # 2 --><waypoint x="6489" z="4454" y="168">
if inventory:itemTotalCount(0) == 0 then loadPaths("merchant.xml")
elseif inventory:itemTotalCount("Razor Tooth Arrow") == 0 then loadPaths("merchant.xml"); end
</waypoint>
<!-- # 3 --><waypoint x="6452" z="4307" y="168"> </waypoint>
<!-- # 4 --><waypoint x="6353" z="4526" y="168"> </waypoint>
</waypoints>
on line 7 im getting an error when i try to add an elseif statement.. what did i do wrong?

Re: help with syntax
Posted: Sun Jan 29, 2012 5:59 pm
by Administrator
You have no 'then' in your 'if' statement.
Re: help with syntax
Posted: Sun Jan 29, 2012 6:01 pm
by jdawg78
uhm.. i believe i do
if inventory:itemTotalCount(0) == 0
then loadPaths("merchant.xml")
elseif inventory:itemTotalCount("Razor Tooth Arrow") == 0
then loadPaths("merchant.xml"); end
Re: help with syntax
Posted: Sun Jan 29, 2012 6:41 pm
by Xmen
remove "type="NORMAL" "
<?xml version="1.0" encoding="utf-8"?><waypoints type="NORMAL">
<!-- # 1 --><waypoint x="6350" z="4620" y="168">
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="6350" z="4620" y="168">
Re: help with syntax
Posted: Sun Jan 29, 2012 6:55 pm
by rock5
jdawg78 wrote:uhm.. i believe i do
if inventory:itemTotalCount(0) == 0
then loadPaths("merchant.xml")
elseif inventory:itemTotalCount("Razor Tooth Arrow") == 0
then loadPaths("merchant.xml"); end
Did you write it exactly like that? I can't see any errors. Was there any other code in the waypoint?