amr shalapy
Banned User
- Joined
- Aug 28, 2014
- Messages
- 122
- Reaction score
- 8
i want fix this error i tried to fix it but didn't work
take a look on talkactions
and two scripts first guildmotd.lua
and mail.lua
iam using tfs 0.3.7_SVN
Code:
[20:40:35.420] > Loading creaturescripts... [Error - CreatureEvent::configureEvent] No valid type for creature event: joinchannel.
[20:40:35.420] [Warning - BaseEvents::loadFromXml] Cannot configure an event
[20:40:35.421] [Error - CreatureEvent::configureEvent] No valid type for creature event: receivemail.
[20:40:35.422] [Warning - BaseEvents::loadFromXml] Cannot configure an event
[20:40:35.456] done.
Code:
<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
Code:
function onJoinChannel(cid, channelId, users)
if(channelId == CHANNEL_GUILD) then
local guildId = getPlayerGuildId(cid)
if(guildId and guildId ~= 0) then
local guildMotd = getGuildMotd(guildId)
if(guildMotd and guildMotd ~= "") then
addEvent(doPlayerSendChannelMessage, 150, cid, "", "Message of the Day: " .. guildMotd, TALKTYPE_CHANNEL_W, CHANNEL_GUILD)
end
end
end
return true
end
Code:
function onReceiveMail(cid, sender, item, openBox)
if(openBox) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "New mail has arrived.")
end
return true
end