MD5 not working

I have this simple code onBeforeUpdate event:

if({pswd} != {confirm_pswd})
{
    sc_error_message({lang_error_pswd});
    sc_error_exit();
}
{pswd} = md5({pswd});


for some reason it is not working and the password is saved as plain text. Any ideas ?

The code is for a form or a Control?
My question is because OnbeforeUpdate work with App forms. and the security works with App Controls.

this is a standard SC generated form which I customize

Im experiencing the same problem with macro sc_error_message (). Any string that i put inside… example sc_error_message(“some text”) or sc_erro_message($error_msg) the app form doesnt work and stay loading … for me happens on befer update event and on validate

That starting when i up to sc9

Please any answer from sc staff?