Finding legacy versions can be tricky. The official Script Hook V website (dev-c.com) typically only hosts the latest version. Here is what you need to know:
Remove all files ending in .asi from your directory except for dinput8.dll . Re-introduce your mods one by one to find the specific script causing the crash. The Trainer Menu Won't Open script hook v for gta 5 version 1.0.877.1
Your ASI loader ( dinput8.dll ) might be blocked. Ensure: Finding legacy versions can be tricky