• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Spell doesn't work(rep++)

Zuxus

Learning C++ and Lua
Joined
Jul 2, 2007
Messages
108
Reaction score
0
Location
Norway
I get this message when I am loading the server: [27/03/2009 17:13:37] Warning: [Event::loadScript] Can not load script. data/spells/scripts/custom/smite.lua
[27/03/2009 17:13:37] data/spells/scripts/custom/smite.lua:1: unexpected symbol near 'ÿ'

It does not work in game and here is smite.lua:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 3)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.8, -20, -2.3, 0)

local arr = {
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 2, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0}
}

local area = createCombatArea(arr)
setCombatArea(combat, area)

function onCastSpell(cid, var)
		return doCombat(cid, combat, var)
end

And this is from spells.xml:
Code:
<instant name="Smite" words="smite" lvl="1500" mana="1000" exhaustion="2000" selftarget="1" needlearn="0" script="custom/smite.lua">
	<vocation name="Sorcerer"/>
	<vocation name="Master Sorcerer"/>
</instant>

Can anyone tell me what is wrong with the script?
Btw I have tried changing the effect 3 with CONST_ME_BLOCKHIT.

Thanks in advance.
 
Try recreating the spell under a different file name. Such errors often occour on file corruption? or whatever.
 
Back
Top