When i use encryption game is giving error

I have problem with encryption option. When i use it game is giving error 


Unable to find file:


./Data/System.rvdata2

error.png
Looks like you are missing the System file stored in the Data folder. Check if it's missing on your project file and encrypt again.
its in there. It didnt happened like this before. If i create new project and copy that file to my project is it work?

error1.png
It might be that a script is the cause.


Scripts can choose between two different functions to load data, and only one of them works on encrypted archives (both work for unencrypted games).


So if you have a script that uses the wrong function to load data from that file, this script will only work unencrypted and throw that error on encryption.


Only solution: that script needs to be rewritten to use the other function to load its data,

Original thread: https://forums.rpgmakerweb.com/threads/when-i-use-encryption-game-is-giving-error.67299/