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

TFS 1.X+ [TFS 1.4.2] Movements script not working

GraveWalker

Member
Joined
Jan 7, 2019
Messages
14
Reaction score
6
Hello, TFS community,

I've been facing a persistent issue with a MoveEvent script in TFS 1.4.2. Despite trying multiple solutions, I still encounter the following error message when attempting to use a simple script:
Code:
[Error - MoveEvent::configureMoveEvent] Missing event
[Warning - BaseEvents::loadFromXml] Failed to configure event

Here's the script I've been working on, which should print "Test script works!" to the server console when a player steps on a tile with the specified actionid (6000):
Lua:
function onStepIn(creature, item, position, fromPosition)
    if not creature:isPlayer() then
        return true
    end

    print("Test script works!")
    return true
end

And here's the MoveEvent registration in the movements.xml file:
XML:
<movevent type="StepIn" actionid="6000" script="test_script.lua" />
I have ensured the following:
  • The script file is located in the data/movements/scripts folder.
  • The file path specified in the movements.xml file is correct.
  • The actionid is set on a tile using the map editor.
  • The server is restarted after making changes to the script or configuration files.
Despite these efforts, the script doesn't work, and the error message persists. I have also tried using itemid and uniqueid instead of actionid, but with no luck.

I would appreciate any insights or suggestions from the community to help resolve this issue. Please let me know if you require any additional information about my TFS setup.

Note: I've made this post again as my previous one is still "Awaiting approval before being displayed publicly." after four hours of waiting.

Thank you in advance!
 
Solution
Yeah, after looking at the XML again, when you mentioned it being: (Before editing)
XML:
<event type="StepIn" actionid="6000" script="test_script.lua" />
is event not type.
XML:
<movevent event="StepIn" actionid="6000" script="test_script.lua" />
I've noticed that instead of:
XML:
type="StepIn"
It should have been:
XML:
event="StepIn"
Unlucky typo, I suppose, but I much appreciate the help from both of you.

Thank you kindly to both of you!
 
Back
Top