fix(qb-core): add global CreateUsableItem alias for qs-inventory compatibility
qs-inventory apelează CreateUsableItem ca funcție globală, dar qb-core definea doar QBCore.Functions.CreateUseableItem (cu 'e'). Adăugat alias global + fix 16 stringuri sparte în items.lua care blocau parsarea.
This commit is contained in:
24
_find_broken.py
Normal file
24
_find_broken.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import re
|
||||
|
||||
path = r'E:\FiveMserver\server\resources\[framework]\[core]\qb-core\shared\items.lua'
|
||||
with open(path, 'r', encoding='utf-8', errors='ignore') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
broken = []
|
||||
for i, line in enumerate(lines):
|
||||
stripped = line.strip()
|
||||
if "['description']" not in stripped:
|
||||
continue
|
||||
if "['name']" not in stripped:
|
||||
continue
|
||||
# Count single quotes after ['description']
|
||||
idx = stripped.index("['description']")
|
||||
after = stripped[idx:]
|
||||
# Should end with ...'}, or ...'}},
|
||||
# Check if description value has matching quotes
|
||||
if after.count("'") % 2 != 0:
|
||||
broken.append((i+1, stripped[:120]))
|
||||
|
||||
print(f"Found {len(broken)} broken strings:")
|
||||
for ln, txt in broken:
|
||||
print(f" L{ln}: {txt}")
|
||||
Reference in New Issue
Block a user