Failure in function for onleavecombat

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Personalausweis
Posts: 73
Joined: Mon Aug 16, 2010 12:50 pm

Failure in function for onleavecombat

#1 Post by Personalausweis »

hi there,

i wanted to write a function whitch gives me full HP after a fight (damn elite worms in limo ;) )

function(s) (addon_heal.lua)

Code: Select all

function heal_after_cast()
	if(50 > player.HP/player.MaxHP*100 ) then
		player:cast("PRIEST_URGENT_HEAL");
		player:cast("PRIEST_REGENERATE");
		player:cast("PRIEST_URGENT_HEAL");
		player:cast("PRIEST_URGENT_HEAL");
	end
end

function full_heal()
while (99 > (player.HP/player.MaxHP*100))
	do
	player:cast("PRIEST_URGENT_HEAL");
	end;
end
and i included them in my profile:

Code: Select all

<onLeaveCombat>
	full_heal();
</onLeaveCombat>

<onSkillCast>
	heal_after_cast();
</onSkillCast>
but when i start RoMBot he always gives an error:

Code: Select all

scripts\rom/bot.lua:25: .../micromacro/scripts/rom/userfunctions/addon_heal.lua:1: unexpected symbol near '´'
i don't know what he wants me to change :(
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: Failure in function for onleavecombat

#2 Post by Administrator »

Provide a full copy of addon_heal.lua and log.txt
Personalausweis
Posts: 73
Joined: Mon Aug 16, 2010 12:50 pm

Re: Failure in function for onleavecombat

#3 Post by Personalausweis »

this is full copy of addon_heal.lua

what log.txt do ou mean? where can i find it?
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: Failure in function for onleavecombat

#4 Post by Administrator »

Upload your copy of addon_heal.lua as an attachment (same with log.txt). It could be an encoding issue or any number of things.

You will find log.txt in the MicroMacro root folder. Only upload log.txt immediately after getting the error (to make sure it's even stored in the log).
Personalausweis
Posts: 73
Joined: Mon Aug 16, 2010 12:50 pm

Re: Failure in function for onleavecombat

#5 Post by Personalausweis »

here they are
Attachments
log.txt
(619 Bytes) Downloaded 101 times
addon_heal.lua
(356 Bytes) Downloaded 119 times
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: Failure in function for onleavecombat

#6 Post by Administrator »

Yeah. It was just an encoding issue. If you are using Notepad++, just open the file, then go to Encoding->Convert to UTF-8 without BOM, then save the file.
Personalausweis
Posts: 73
Joined: Mon Aug 16, 2010 12:50 pm

Re: Failure in function for onleavecombat

#7 Post by Personalausweis »

thanks a lot now its working as intended :)
Post Reply