Eisa01 / mpv-scripts

This repository contain scripts I have made for mpv media player...
BSD 2-Clause "Simplified" License
593 stars 38 forks source link

SmartCopyPaste_II.lua loading error #156

Closed YLKX0106 closed 3 months ago

YLKX0106 commented 3 months ago

I'm experiencing an error when loading the SmartCopyPaste_II.lua script in mpv.

Description: I've placed the SmartCopyPaste_II.lua script in the \mpv\portable_config\scripts directory and there are no other scripts present. However, when I open mpv, it displays a loading error with the following message:

[SmartCopyPaste_II]
[SmartCopyPaste_II] stack traceback:
[SmartCopyPaste_II]     [C]: at 0x7ff75e614540
[SmartCopyPaste_II] Lua error: C:/soft/mpv/portable_config/scripts/SmartCopyPaste_II.lua:1: '=' expected near '-'

Environment: Windows version: Windows 10 22H2 mpv version:

mpv v0.37.0-754-g58eae25f Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Apr 10 2024 00:25:37
libplacebo version: v7.349.0 (v6.338.0-120-g7b29435-dirty)
FFmpeg version: N-114775-g359b6a7f8
FFmpeg library versions:
   libavutil       59.13.100
   libavcodec      61.5.101
   libavformat     61.3.100
   libswscale      8.2.100
   libavfilter     10.2.101
   libswresample   5.2.100
YLKX0106 commented 3 months ago

I found that the issue was caused by copying the code directly. Running the script from the downloaded zip file works as expected.