pawn-lang / sa-mp-fixes

Includes and plugins to fix various issues in the SA:MP server that can be fixed externally, leaving the devs time for other things.
135 stars 57 forks source link

Can't load FilterScripts - Need Help #165

Closed Uggohe closed 10 months ago

Uggohe commented 2 years ago

Hi, I hope this is the right place to write my problem into. For sure there is something I'm missing, but I don't know where to find help.

I've got a bunch of FilterScripts to load, but, after loading the first one (LuxAdmin), the server tries to load a weird named FilterScript I don't have and then stops loading and just runs. This FilterScript name is always 1 character long (*.amx).

As you can see in the lines below, it also changes the characters, for instance "Enabled" became "Enabled!¼Ø " (those strings are defined in this way: new rLocked[9]; if(stuff) rLocked="Enabled!" else rLocked="Disabled!").

Looks like I can still load the FilterScrips later from the command line.

Here's how the console looks like with included and not: INCLUDED:

---------------
  Loading filterscript 'LuxAdmin.amx'...

*** fixes.inc info: Trying to unload RconCommand/ClientCheckResponse fix FS...
***                 Ignore any errors if the FS already unloaded.

  Filterscript '../scriptfiles/callbackfix.amx' unload failed.

*** fixes.inc info: Trying to load multiple ID determination FSes...
***                 Ignore any errors due to insufficient FS slots.

  Filterscript '../scriptfiles/fs-count-A.amx' loaded.
  Filterscript '../scriptfiles/fs-count-B.amx' loaded.
  Filterscript '../scriptfiles/fs-count-C.amx' loaded.
  Filterscript '../scriptfiles/fs-count-D.amx' loaded.
  Filterscript '../scriptfiles/fs-count-E.amx' loaded.
  Filterscript '../scriptfiles/fs-count-F.amx' loaded.
  Filterscript '../scriptfiles/fs-count-G.amx' loaded.
  Filterscript '../scriptfiles/fs-count-H.amx' loaded.
  Filterscript '../scriptfiles/fs-count-I.amx' loaded.
  Filterscript '../scriptfiles/fs-count-J.amx' loaded.
  Filterscript '../scriptfiles/fs-count-K.amx' loaded.
  Filterscript '../scriptfiles/fs-count-L.amx' loaded.
  Filterscript '../scriptfiles/fs-count-M.amx' loaded.
  Filterscript '../scriptfiles/fs-count-N.amx' loaded.
  Filterscript '../scriptfiles/fs-count-O.amx' loaded.
  Filterscript '../scriptfiles/fs-count-P.amx' load failed.

*** fixes.inc info: If this crashes it might be due to pawn-uuid.  See:

    https://github.com/Southclaws/pawn-uuid/issues/8#issuecomment-984940512

  Filterscript '../scriptfiles/fs-count-O.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-N.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-M.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-L.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-K.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-J.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-I.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-H.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-G.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-F.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-E.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-D.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-C.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-B.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-A.amx' unloaded.

 ___________________________________________________

                   L.A.S v1.5
                 -------------
             LuX Administration System
 ___________________________________________________

 -> Loading...

Forbidden Weapons File NOT Loaded!

 -Current Configurations Successfully Loaded!

 -> L.A.S Basic Loaded Configurations:

 AutoLogin:    [Enabled!¼Ø ]  ReadCmds:  [Enabled!♦Enabled!¼Ø ]  <----------------------THIS IS WEIRD
 AntiSwear:    [DisabledØEnabled!]  AntiSpam:  [Disabled¸Enabled!LEnabled!♦Enabled!¼Ø ]
 NameKick:     [Enabled!ÜDisabled¸Enabled!LEnabled!♦Enabled!¼Ø ]  AntiBot:   [Enabled!lEnabled!ÜDisabled¸Enabled!LEnabled!♦Enabled!¼Ø ]
 ConnectMsgs:  [Enabled!DDisabled Enabled!lEnabled!ÜDisabled¸Enabled!LEnabled!♦Enabled!¼Ø ]  NoCaps:    [Disabled]
 AdminCmdMsgs: [Enabled!]  Anti Ads:  [Enabled!]
 SaveMoney:    [Enabled!]  MustLogin  [Enabled!]
 Forbid Weaps: [Disabled]  AdmSkins:  [DisabledHEnabled!]
 ReadPms:      [Enabled!LEnabled!♦Enabled!¼Ø ]  MaxLevel:  [10]
 SaveWeaps     [Enabled!]  Max Ping:  [0ms]
 ChatDisabled: [Disabled]  MuteWarns: [4]
 MustRegister: [Enabled!]  AdmSkins   [217, 214]

 -> Loaded Successfully!

 Date: 24/12/2021 - Time: 8:43:4
 ___________________________________________________

  Loading filterscript '_.amx'...               <-----------------------------------------THIS IS WEIRD A LOT
  Unable to load filterscript ''.amx'.       <-----------------------------------------Then changes too! 😢 
  Loaded 1 filterscripts.

*** fixes.inc info: Trying to unload RconCommand/ClientCheckResponse fix FS...
***                 Ignore any errors if the FS already unloaded.

  Filterscript '../scriptfiles/callbackfix.amx' unload failed.

*** fixes.inc info: Trying to load multiple ID determination FSes...
***                 Ignore any errors due to insufficient FS slots.

  Filterscript '../scriptfiles/fs-count-A.amx' loaded.
  Filterscript '../scriptfiles/fs-count-B.amx' loaded.
  Filterscript '../scriptfiles/fs-count-C.amx' loaded.
  Filterscript '../scriptfiles/fs-count-D.amx' loaded.
  Filterscript '../scriptfiles/fs-count-E.amx' loaded.
  Filterscript '../scriptfiles/fs-count-F.amx' loaded.
  Filterscript '../scriptfiles/fs-count-G.amx' loaded.
  Filterscript '../scriptfiles/fs-count-H.amx' loaded.
  Filterscript '../scriptfiles/fs-count-I.amx' loaded.
  Filterscript '../scriptfiles/fs-count-J.amx' loaded.
  Filterscript '../scriptfiles/fs-count-K.amx' loaded.
  Filterscript '../scriptfiles/fs-count-L.amx' loaded.
  Filterscript '../scriptfiles/fs-count-M.amx' loaded.
  Filterscript '../scriptfiles/fs-count-N.amx' loaded.
  Filterscript '../scriptfiles/fs-count-O.amx' loaded.
  Filterscript '../scriptfiles/fs-count-P.amx' load failed.

*** fixes.inc info: If this crashes it might be due to pawn-uuid.  See:

    https://github.com/Southclaws/pawn-uuid/issues/8#issuecomment-984940512

  Filterscript '../scriptfiles/fs-count-O.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-N.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-M.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-L.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-K.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-J.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-I.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-H.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-G.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-F.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-E.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-D.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-C.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-B.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-A.amx' unloaded.

---------------------------------------
Running the gamemode

---------------------------------------

Number of vehicle models: 0`

NOT INCLUDED:

`Filterscripts
---------------
  Loading filterscript 'LuxAdmin.amx'...

 ___________________________________________________

                   L.A.S v1.5
                 -------------
             LuX Administration System
 ___________________________________________________

 -> Loading...

Forbidden Weapons File NOT Loaded!

 -Current Configurations Successfully Loaded!

 -> L.A.S Basic Loaded Configurations:

 AutoLogin:    [Enabled!]  ReadCmds:  [Enabled!]       <----------------------- How it should look
 AntiSwear:    [Disabled]  AntiSpam:  [Disabled]
 NameKick:     [Enabled!]  AntiBot:   [Enabled!]
 ConnectMsgs:  [Enabled!]  NoCaps:    [Disabled]
 AdminCmdMsgs: [Enabled!]  Anti Ads:  [Enabled!]
 SaveMoney:    [Enabled!]  MustLogin  [Enabled!]
 Forbid Weaps: [Disabled]  AdmSkins:  [Disabled]
 ReadPms:      [Enabled!]  MaxLevel:  [10]
 SaveWeaps     [Enabled!]  Max Ping:  [0ms]
 ChatDisabled: [Disabled]  MuteWarns: [4]
 MustRegister: [Enabled!]  AdmSkins   [217, 214]

 -> Loaded Successfully!

 Date: 24/12/2021 - Time: 8:52:21
 ___________________________________________________

  Loading filterscript 'Menu.amx'...

*** fixes.inc info: Trying to unload RconCommand/ClientCheckResponse fix FS...
***                 Ignore any errors if the FS already unloaded.

  Filterscript '../scriptfiles/callbackfix.amx' unload failed.

*** fixes.inc info: Trying to load multiple ID determination FSes...
***                 Ignore any errors due to insufficient FS slots.

  Filterscript '../scriptfiles/fs-count-A.amx' loaded.
  Filterscript '../scriptfiles/fs-count-B.amx' loaded.
  Filterscript '../scriptfiles/fs-count-C.amx' loaded.
  Filterscript '../scriptfiles/fs-count-D.amx' loaded.
  Filterscript '../scriptfiles/fs-count-E.amx' loaded.
  Filterscript '../scriptfiles/fs-count-F.amx' loaded.
  Filterscript '../scriptfiles/fs-count-G.amx' loaded.
  Filterscript '../scriptfiles/fs-count-H.amx' loaded.
  Filterscript '../scriptfiles/fs-count-I.amx' loaded.
  Filterscript '../scriptfiles/fs-count-J.amx' loaded.
  Filterscript '../scriptfiles/fs-count-K.amx' loaded.
  Filterscript '../scriptfiles/fs-count-L.amx' loaded.
  Filterscript '../scriptfiles/fs-count-M.amx' loaded.
  Filterscript '../scriptfiles/fs-count-N.amx' loaded.
  Filterscript '../scriptfiles/fs-count-O.amx' load failed.

*** fixes.inc info: If this crashes it might be due to pawn-uuid.  See:

    https://github.com/Southclaws/pawn-uuid/issues/8#issuecomment-984940512

  Filterscript '../scriptfiles/fs-count-N.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-M.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-L.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-K.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-J.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-I.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-H.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-G.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-F.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-E.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-D.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-C.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-B.amx' unloaded.
  Filterscript '../scriptfiles/fs-count-A.amx' unloaded.

--------------------------------------
Menu vari caricati!
--------------------------------------

...            <---------------------------------------------------------More FilterScripts here

---------------------------------------
Running the gamemode

---------------------------------------

Number of vehicle models: 0

All this makes me think it messes up something with how the server deals with strings? I really don't know what to think.

Can any of you give me any kind of advice please?

Update: I was thinking, may it be that somehow the terminator character gets overwritten and the strings, which are defined all in sequence, get printed all together? I noticed that the "Enabled!" "Disabled" concatenates almost every time they are assigned in the code.

Y-Less commented 2 years ago

Yes, it does look like the strings are getting unterminated. However, I would have to see the code because fixes.inc doesn't touch SendRconCommand.

Y-Less commented 2 years ago

Try it now, I did fix something else that might have caused this.