The trigger:
And the script:
Why isn't it working? When I try to print the table "enchantments" it says that it is a nil value.
</trigger>
<trigger
enabled="y"
match="^Password correct\. Welcome to Lusternia\.$"
name="Login"
regexp="y"
script="login"
send_to="12"
sequence="100"
>
And the script:
function login ()
reset_vars ()
reset_tables ()
get_score ()
loadstring (GetVariable ("enchantments"))
SetChanged (true)
end -- funtion
function OnWorldSave ()
require "serialize"
SetVariable ("enchantments", serialize ('enchantments'))
end -- function
Why isn't it working? When I try to print the table "enchantments" it says that it is a nil value.