Advertisement
Arbie2

SB mod gun error

Sep 25th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.89 KB | None | 0 0
  1. starbound.log excerpt
  2. ==========
  3. [02:28:58.699] [Error] Exception while invoking lua function 'update'. (LuaException) Error code 2, [string "/items/active/weapons/weapon.lua"]:264: [string "/items/active/weapons/ranged/gunfire.lua"]:152: attempt to perform arithmetic on a nil value
  4. stack traceback:
  5.     [string "/items/active/weapons/ranged/gunfire.lua"]:152: in method 'damagePerShot'
  6.     [string "/items/active/weapons/ranged/gunfire.lua"]:108: in method 'fireProjectile'
  7.     [string "/items/active/weapons/ranged/gunfire.lua"]:47: in function <[string "/items/active/weapons/ranged/gunfire.lua"]:44>
  8. stack traceback:
  9.     [C]: in ?
  10.     [C]: in function '_ENV.error'
  11.     [string "/items/active/weapons/weapon.lua"]:264: in method 'setAbilityState'
  12.     [string "/items/active/weapons/weapon.lua"]:467: in method 'setState'
  13.     [string "/items/active/weapons/ranged/gunfire.lua"]:37: in method 'update'
  14.     [string "/items/active/weapons/weapon.lua"]:182: in method 'update'
  15.     [string "/items/active/weapons/ranged/gun.lua"]:26: in function <[string "/items/active/weapons/ranged/gun.lua"]:25>
  16.  
  17. Gun file excerpt- relevant info
  18. ==========
  19. "animation" : "/items/active/weapons/ranged/gun.animation",
  20.  
  21.   "animationParts" : {
  22.  
  23.     "butt" : "",
  24.  
  25.     "middle" : "Fireduke.png",
  26.  
  27.     "barrel" : "",
  28.  
  29.     "muzzleFlash" : "/items/active/weapons/ranged/muzzleflash.png"
  30.  
  31.   },
  32.  
  33.   "animationCustom" : {
  34.  
  35.     "particleEmitters" : {
  36.  
  37.       "muzzleFlash" : {
  38.  
  39.         "particles" : [
  40.  
  41.           { "particle" : "rocketbarrelpuff", "offset" : [0.0, -0.2] }
  42.  
  43.         ]
  44.  
  45.       }
  46.  
  47.     },
  48.  
  49.     "sounds" : {
  50.  
  51.       "fire" : [ "/sfx/gun/mech_gatling1.ogg" ]
  52.  
  53.     }
  54.  
  55.   },
  56.  
  57.   "baseOffset" : [1.0, 0.1],
  58.  
  59.   "muzzleOffset" : [2.5, -0.2],
  60.  
  61.  
  62.  
  63.   "scripts" : ["/items/active/weapons/ranged/gun.lua"],
  64.  
  65.  
  66.   "elementalType" : "fire",
  67.  
  68.  
  69.  
  70.   "primaryAbility" : {
  71.  
  72.     "scripts" : ["/items/active/weapons/ranged/gunfire.lua"],
  73.  
  74.     "class" : "GunFire",
  75.  
  76.  
  77.     "fireTime" : 0.1,
  78.  
  79.     "baseDps" : 900,
  80.  
  81.     "energyUsage" : 5,
  82.  
  83.     "inaccuracy" : 0.1,
  84.  
  85.     "projectileCount" : 1,
  86.  
  87.     "fireType" : "auto",
  88.  
  89.  
  90.  
  91.     "projectileType" : "standardbullet",
  92.  
  93.     "projectileParameters" : {
  94.  
  95.       "knockback" : 8,
  96.  
  97.       "statusEffects" : [ "burning" ]
  98.  
  99.     },
  100.  
  101.  
  102.  
  103.     "stances" : {
  104.  
  105.       "idle" : {
  106.  
  107.         "armRotation" : 0,
  108.  
  109.         "weaponRotation" : 0,
  110.  
  111.         "twoHanded" : true,
  112.  
  113.  
  114.  
  115.         "allowRotate" : true,
  116.  
  117.         "allowFlip" : true
  118.  
  119.       },
  120.  
  121.       "fire" : {
  122.  
  123.         "duration" : 0,
  124.  
  125.         "armRotation" : 5,
  126.  
  127.         "weaponRotation" : 5,
  128.  
  129.         "twoHanded" : true,
  130.  
  131.  
  132.  
  133.         "allowRotate" : false,
  134.  
  135.         "allowFlip" : true
  136.  
  137.       },
  138.  
  139.       "cooldown" : {
  140.  
  141.         "duration" : 0.1,
  142.  
  143.         "armRotation" : 5,
  144.  
  145.         "weaponRotation" : 5,
  146.  
  147.         "twoHanded" : true,
  148.  
  149.  
  150.  
  151.         "allowRotate" : false,
  152.  
  153.         "allowFlip" : true
  154.  
  155.       }
  156.  
  157.     }
  158.  
  159.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement