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

Windows !Source error?

Fu Manchu

Sepultra™
Joined
Jan 28, 2011
Messages
439
Reaction score
9
I got an error that involves a file that is compiled. -.- So I'm guess in order to fix this I need to recompile. But I also need to fix the problem.... any idea's guys? SS below.


 
it's obviously a Lua syntax error in one of the mods. the one with comes alphabetically after changender_command.xml
 
I hate mods, because
1. This happens if errors.
2. Cant tell you where errors are (stupid if you got 300 lines)
 
Well at least I know I'm the one who fucked it up. And It isn't something that just happened randomly.

Here's my script can any one tell me where the fuck up is? Because I can't find it. :S

XML:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Talkactions" version="1.0" author="Sepultra" contact="Fu Manchu" enabled="yes">
	<!-- Custom Commands --> 
	<talkaction log="yes" access="0" words="!aol" event="script"><![CDATA[
function onSay(cid, words, param)
	if doPlayerRemoveMoney(cid, 10000) true then
		doPlayerAddItem(cid, 2173, 1) ; 
		doSendMagicEffect(getThingPosition(cid), CONST_ME_MAGIC_BLUE) ; 
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, ("You've bought an amulet of loss!")) ; 
	else
		doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) ; 
		return doPlayerSendCancel(cid, ("You don't have enough money.")) ; 
	end ; return true ; 
end ; 
	]]></talkaction>
	<talkaction log="yes" access="0" words="!bless" event="script"><![CDATA[
function onSay(cid, words, param, channel)
	local blessings, cost = { 1, 2, 3, 4, 5 }, 50000
	for i = 1, #blessings do
		if(getPlayerBlessing(cid, blessings[i])) then
			doPlayerSendCancel(cid, ("You already have been blessed by God Sepultra.")) ;
			doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) ; 
		elseif(getPlayerMoney(cid) < cost) then
			doPlayerSendCancel(cid, ("You do not have enough money.")) ; 
			doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) ; 
		else
			doPlayerAddBlessing(cid, blessings[i]) ; 
			doPlayerRemoveMoney(cid, cost) ; 
			doSendMagicEffect(getThingPosition(cid),39) ; 
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ("You have recived all 5 blessings from God Sepultra.")) ; 
		end
		return true
	end
end   
	]]></talkaction>
</mod>
 
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Talkactions" version="1.0" author="Sepultra" contact="Fu Manchu" enabled="yes">
	<!-- Custom Commands -->
	<talkaction log="yes" access="0" words="!aol" event="script"><![CDATA[
function onSay(cid, words, param)
	if doPlayerRemoveMoney(cid, 10000) then
		doPlayerAddItem(cid, 2173, 1) ; 
		doSendMagicEffect(getThingPosition(cid), CONST_ME_MAGIC_BLUE) ; 
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've bought an amulet of loss!") ; 
	else
		doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) ; 
		return doPlayerSendCancel(cid, "You don't have enough money.") ; 
	end ; return true ; 
end ; 
	]]></talkaction>
	<talkaction log="yes" access="0" words="!bless" event="script"><![CDATA[
function onSay(cid, words, param, channel)
	local blessings, cost = { 1, 2, 3, 4, 5 }, 50000 ; 
	for i = 1, #blessings do
		if(getPlayerBlessing(cid, blessings[i])) then
			doPlayerSendCancel(cid, "You already have been blessed by God Sepultra.") ;
			doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) ; 
		elseif(getPlayerMoney(cid) < cost) then
			doPlayerSendCancel(cid, "You do not have enough money.") ; 
			doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) ; 
		else
			doPlayerAddBlessing(cid, blessings[i]) ; 
			doPlayerRemoveMoney(cid, cost) ; 
			doSendMagicEffect(getThingPosition(cid), 39) ; 
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have recived all 5 blessings from God Sepultra.") ; 
		end
		return true
	end
end   
	]]></talkaction>
</mod>

Sup Andrew :), Use a compare tool, to see what I changed, it should work, hopefully I haven't missed anything out.
Also, did you test the scripts before you modularized them?

I hate mods, because
1. This happens if errors.
2. Cant tell you where errors are (stupid if you got 300 lines)

http://www.unknownworlds.com/decoda
Decoda FTW
 
well i modified it to lessaire's standards and I think I had fucked it up

EDIT:


It fixed the problem I think it was the extra shit I added. I was basing it of this



--[[ Horrid ]] doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You got some "..variable..".")
--[[ Better ]] doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You got some "..variable..".");
--[[ Better ]] doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You got some "..variable..".") ;
--[[ Better ]] doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got some "..variable..".") ;
--[[ Better ]] doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got some " .. variable .. ".") ;
--[[ Right ]] doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, ("You got some " .. variable .. ".")) ;


I figured out what the problem was
 
Last edited:
Well that file isn't a LUA. It's XML. And If I do copy and paste the code over It always give me the same error.

input:1: unexpected symbol near '<'

lol but the script works fine.
 
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Talkactions" version="1.0" author="Sepultra" contact="Fu Manchu" enabled="yes">
	<talkaction log="yes" access="0" words="!aol" event="script"><![CDATA[
	function onSay(cid, words, param)
		if doPlayerRemoveMoney(cid, 10000) then
			doPlayerAddItem(cid, 2173, 1) ; 
			doSendMagicEffect(getThingPosition(cid), CONST_ME_MAGIC_BLUE) ; 
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, ("You've bought an amulet of loss!")) ; 
		else
			doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) ; 
			return doPlayerSendCancel(cid, ("You don't have enough money.")) ; 
		end ;
		return true ; 
	end ; 
	]]></talkaction>
	<talkaction log="yes" access="0" words="!bless" event="script"><![CDATA[
	function onSay(cid, words, param, channel)
		local blessings, cost = { 1, 2, 3, 4, 5 }, 50000
		for i = 1, #blessings do
			if(getPlayerBlessing(cid, blessings[i])) then
				doPlayerSendCancel(cid, ("You already have been blessed by God Sepultra.")) ;
				doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) ; 
			elseif(getPlayerMoney(cid) < cost) then
				doPlayerSendCancel(cid, ("You do not have enough money.")) ; 
				doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) ; 
			else
				doPlayerAddBlessing(cid, blessings[i]) ; 
				doPlayerRemoveMoney(cid, cost) ; 
				doSendMagicEffect(getThingPosition(cid),39) ; 
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ("You have recived all 5 blessings from God Sepultra.")) ; 
			end
			return true
		end
	end   
	]]></talkaction>
</mod>
 
Back
Top