• 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!

Problem with scripts

dawiisss

Ye wanna!!
Joined
Nov 30, 2008
Messages
161
Reaction score
0
Location
United Kingdom
Hi i have a problem when i add any script it always shows
[10/01/2010 17:58:51] [Error - LuaScriptInterface::loadFile] data/actions/scripts/paccrune.lua:1: unexpected symbol near 'ÿ'
[10/01/2010 17:58:51] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/paccrune.lua)

in the gui console i am using TFS 0.3.6 for 8.54

after this none of scripts work... please help
 
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2275 then
local playerpos = getCreaturePosition(cid)
doRemoveItem(item.uid,2275)
addPremium(cid, 7)
doSendMagicEffect(playerpos, 12)
doPlayerSendTextMessage(cid,22,"Dziękujemy za dotacje otrzymales 7 dni premium")
end
end


But i have the problem for all of the new scripts i add..
 
Lua:
function onUse(cid, item, frompos, item2, topos)
	doRemoveItem(item.uid)
	doPlayerAddPremiumDays(cid, 7)
	doSendMagicEffect(getCreaturePosition(cid), 12)
	doPlayerSendTextMessage(cid, 22, "Dziekujemy za dotacje otrzymales 7 dni premium")
return true
end
 
Reload actions? ^^

If you're using it as a rune and wants it to be possible to use it on other players, then use this one instead:
Lua:
function onUse(cid, item, frompos, itemEx, topos)
	if isPlayer(itemEx.uid) == TRUE then
		doRemoveItem(item.uid)
		doPlayerAddPremiumDays(itemEx.uid, 7)
		doSendMagicEffect(getCreaturePosition(itemEx.uid), 12)
		doPlayerSendTextMessage(itemEx.uid, 22, "Dziekujemy za dotacje otrzymales 7 dni premium")
	else
		doPlayerSendCancel(cid, "You can only use this on players.")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	end
return true
end
 
Last edited:
when i was changing script the server was off/shutdown and then when i saved it i turned it on ... and the same thing i double checked the file and it's right ...


there is one other problem when i downloaded the tfs and started for first time the annihilator quest script showed this error and it still shows it...

Please help..
 
The annihilator script that comes with TFS isn't working, but that has nothing to do with this script.
Post your actions.xml, maybe you did something wrong there.
 
<?xml version="1.0" encoding="UTF-8"?>
<actions>

<action itemid="2275" script="paccrune.lua" />

<action itemid="2309" script="addonrune.lua"/>
<action itemid="2314" script="blessrune.lua"/>

<action itemid="6558" script="speedpot.lua" />

<action itemid="2284" event="script" value="runes/manarune.lua" allowfaruse="1"/>
<!-- Quests -->
<action actionid="2000" event="script" value="quests/system.lua"/>
<action actionid="2001" event="script" value="quests/system.lua"/>
<action uniqueid="30015" event="script" value="quests/annihilator.lua"/>

<!-- Weapons enchanting (Gems) -->
<action itemid="2146" event="script" value="other/enchanting.lua"/>
<action itemid="2147" event="script" value="other/enchanting.lua"/>
<action itemid="2150" event="script" value="other/enchanting.lua"/>
<action itemid="2149" event="script" value="other/enchanting.lua"/>
<action itemid="7759" event="script" value="other/enchanting.lua"/>
<action itemid="7760" event="script" value="other/enchanting.lua"/>
<action itemid="7761" event="script" value="other/enchanting.lua"/>
<action itemid="7762" event="script" value="other/enchanting.lua"/>

<!-- Tools -->
<action itemid="2420" event="script" value="tools/machete.lua"/>
<action itemid="2442" event="script" value="tools/machete.lua"/>
<action itemid="2550" event="script" value="tools/scythe.lua"/>
<action itemid="2580" event="script" value="tools/fishing.lua" allowfaruse="1"/>
<action itemid="10223" event="script" value="tools/fishing.lua" allowfaruse="1"/>
<action itemid="2554" event="script" value="tools/shovel.lua"/>
<action itemid="5710" event="script" value="tools/shovel.lua"/>
<action itemid="2120" event="script" value="tools/rope.lua"/>
<action itemid="7731" event="script" value="tools/rope.lua"/>
<action itemid="2553" event="script" value="tools/pick.lua"/>
<action itemid="5908" event="script" value="tools/obsidian_knife.lua"/>
<action itemid="5942" event="script" value="tools/blessed_wooden_stake.lua"/>

Help me xD
 
PHP:
<action itemid="2275" event="script" value="paccrune.lua" allowfaruse="1"/>

<action itemid="2309" event="script" value="addonrune.lua"/>
<action itemid="2314" event="script" value="blessrune.lua"/>

<action itemid="6558" event="script" value="speedpot.lua"/>

<!-- Quests -->
<action actionid="2000" event="script" value="quests/system.lua"/>
<action actionid="2001" event="script" value="quests/system.lua"/>
<action uniqueid="30015" event="script" value="quests/annihilator.lua"/> 

<!-- Weapons enchanting (Gems) -->
<action itemid="2146" event="script" value="other/enchanting.lua"/>
<action itemid="2147" event="script" value="other/enchanting.lua"/>
<action itemid="2150" event="script" value="other/enchanting.lua"/>
<action itemid="2149" event="script" value="other/enchanting.lua"/>
<action itemid="7759" event="script" value="other/enchanting.lua"/>
<action itemid="7760" event="script" value="other/enchanting.lua"/>
<action itemid="7761" event="script" value="other/enchanting.lua"/>
<action itemid="7762" event="script" value="other/enchanting.lua"/>

<!-- Tools -->
<action itemid="2420" event="script" value="tools/machete.lua"/>
<action itemid="2442" event="script" value="tools/machete.lua"/>
<action itemid="2550" event="script" value="tools/scythe.lua"/>
<action itemid="2580" event="script" value="tools/fishing.lua" allowfaruse="1"/>
<action itemid="10223" event="script" value="tools/fishing.lua" allowfaruse="1"/>
<action itemid="2554" event="script" value="tools/shovel.lua"/>
<action itemid="5710" event="script" value="tools/shovel.lua"/>
<action itemid="2120" event="script" value="tools/rope.lua"/>
<action itemid="7731" event="script" value="tools/rope.lua"/>
<action itemid="2553" event="script" value="tools/pick.lua"/>
<action itemid="5908" event="script" value="tools/obsidian_knife.lua"/>
<action itemid="5942" event="script" value="tools/blessed_wooden_stake.lua"/>

Replace with this and remove the annihilator line.
 
[10/01/2010 19:07:51] [Error - LuaScriptInterface::loadFile] data/actions/scripts/paccrune.lua:1: unexpected symbol near 'ÿ'
[10/01/2010 19:07:51] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/paccrune.lua)
[10/01/2010 19:07:51] data/actions/scripts/paccrune.lua:1: unexpected symbol near 'ÿ'

The same thing :(
 
[10/01/2010 19:36:37] [Error - LuaScriptInterface::loadFile] data/actions/scripts/paccrunee.lua:1: unexpected symbol near 'ÿ'
[10/01/2010 19:36:37] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/paccrunee.lua)
[10/01/2010 19:36:37] data/actions/scripts/paccrunee.lua:1: unexpected symbol near 'ÿ'

again the same thin :( please help
 
Try this one:

Code:
local days = 7

function onUse(cid, item, frompos, item2, topos)
local playerpos = getCreaturePosition(cid)

if item.itemid == 2275 then
doRemoveItem(item.uid,2275)
doPlayerAddPremiumDays(cid, days)
doSendMagicEffect(playerpos, 12)
doPlayerSendTextMessage(cid,22,"You received ".. days .." premium days.")
end
end
 
Back
Top