In my opinion, nVault is already relatively user-friendly. This include essentially just formats a user-specific key for different key values which is something that a beginner user should learn out of the gate before creating a plugin. I think a tutorial on strings/formatex() already exists.
Here are a few things I noticed:
- This allows only 1 vault per plugin.
- You should allow the user to specify the vault name instead of hard-coding it.
- In your open function, you have "Problems with Nvault Passwords .vault" as an error message which makes no sense. You should leave this more broad, something like 'Error opening [vault name] vault."
- Your get_integer function doesn't really make sense. Why doesn't it just return iData? If your idea is to make it return 0 if no data exists in the vault then you need to use nvault_lookup() instead of nvault_get() since nvault_get() returns 0 if no data exists or if the stored value is 0. nvault_lookup() allows you to determine whether or not the data exists, but in either case, you need to allow a user to store 0 so you need some other return value if no data was found.
__________________