General > Developers Corner

Gmod Nutscript Server How To Set Factions Health

<< < (3/3)

Capin:

[ERROR] gamemodes/warhammer40krp/schema/factions/sh_deathwatch.lua:21: attempt to index global 'Deathwatch' (a nil value)
  1. unknown - gamemodes/warhammer40krp/schema/factions/sh_deathwatch.lua:21
   2. include - [C]:-1
    3. include - gamemodes/nutscript/gamemode/core/sh_util.lua:17
     4. loadFromDir - gamemodes/nutscript/gamemode/core/libs/sh_faction.lua:39
      5. load - gamemodes/nutscript/gamemode/core/libs/sh_plugin.lua:34
       6. initialize - gamemodes/nutscript/gamemode/core/libs/sh_plugin.lua:163
        7. Call - gamemodes/nutscript/gamemode/shared.lua:77
         8. unknown - lua/includes/modules/gamemode.lua:38
          9. DeriveGamemode - [C]:-1
           10. unknown - gamemodes/warhammer40krp/gamemode/cl_init.lua:1


[ERROR] gamemodes/warhammer40krp/schema/factions/sh_deathwatch.lua:21: attempt to index global 'Deathwatch' (a nil value)
  1. unknown - gamemodes/warhammer40krp/schema/factions/sh_deathwatch.lua:21
   2. include - [C]:-1
    3. include - gamemodes/nutscript/gamemode/core/sh_util.lua:17
     4. loadFromDir - gamemodes/nutscript/gamemode/core/libs/sh_faction.lua:39
      5. load - gamemodes/nutscript/gamemode/core/libs/sh_plugin.lua:34
       6. initialize - gamemodes/nutscript/gamemode/core/libs/sh_plugin.lua:163
        7. Call - gamemodes/nutscript/gamemode/shared.lua:77
         8. unknown - lua/includes/modules/gamemode.lua:33

the first one gives me these two errors while the second one gives me no errors but it still doesn't work.

iViscosity:
Please use the  tag when you are posting errors.


Can you post the entirety of the "Deathwatch" file using the [code] *put all your stuff here [/code] tag, please?


Also, if you have any other factions that have altered health, you could look at the code and copy paste it. I'm looking for some documentation about it, but I can't seem to find much as I'm not very familiar with NutScript.

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given

[0] Board index

Go to full version