View Single Post
  #11  
Old 06-09-2022, 18:50
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,074
Thanks: 1,814
Thanked 2,304 Times in 787 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by Lord.Freddy View Post
Hi Cesar82, Thank you for the script you made, but i have a problem when adding the skin(cjstyles) with INI code, the skin is not added, So i made some changes:

Code:
#if !defined(StyleFile)
  #define StyleFile "NULL"
#else
  #define StyleParam ""
  #if Pos("|", StyleFile) > 0
    #define StyleParam Trim(Copy(StyleFile, Pos("|",  StyleFile + "|") + 1, Len(StyleFile)))
      #expr StyleParam = StyleParam + ".ini"
    #if (StyleParam != "") && (LowerCase(ExtractFileExt(StyleFile)) == "cjstyles")
      #expr StyleParam = StyleParam + ".ini"
    #endif
    #define StyleFile Trim(Copy(StyleFile, 0, Pos("|",  StyleFile) - 1))
  #endif
  #if (LowerCase(ExtractFileExt(StyleFile)) != "vsf") && (LowerCase(ExtractFileExt(StyleFile)) != "cjstyles") && (LowerCase(ExtractFileExt(StyleFile)) != "she")
    #define StyleFile "NULL"
  #endif
#endif
if you like, add these changes to your Script
FIX:
Code:
#if !defined(StyleFile)
  #define StyleFile "NULL"
#else
  #define StyleParam ""
  #if Pos("|", StyleFile) > 0
    #define StyleParam Trim(Copy(StyleFile, Pos("|",  StyleFile + "|") + 1, Len(StyleFile)))
    #define StyleFile Trim(Copy(StyleFile, 0, Pos("|",  StyleFile) - 1))
    #if (StyleParam != "") && (LowerCase(ExtractFileExt(StyleFile)) == "cjstyles")
      #expr StyleParam = StyleParam + ".ini"
    #else
      #define StyleParam ""
    #endif
  #endif
  #if (LowerCase(ExtractFileExt(StyleFile)) != "vsf") && (LowerCase(ExtractFileExt(StyleFile)) != "cjstyles") && (LowerCase(ExtractFileExt(StyleFile)) != "she")
    #define StyleFile "NULL"
  #endif
#endif
Reply With Quote
The Following 2 Users Say Thank You to Cesar82 For This Useful Post:
Gehrman (07-09-2022), Lord.Freddy (14-09-2022)