Code:
Expression 2 (generic): entities/gmod_wire_expression2/core/core.lua:62: attempt to call upvalue '__f_g' (a nil value)
sv: Expression 2 (generic): Error(s) occured while executing 'destruct' hook:
entities/gmod_wire_expression2/core/custom/e2derma.lua:243: attempt to index field '?' (a nil value)
sv: Expression 2 (generic): entities/gmod_wire_expression2/core/core.lua:62: attempt to call upvalue '__f_g' (a nil value)
Expression 2 (generic): Error(s) occured while executing 'destruct' hook:
entities/gmod_wire_expression2/core/custom/e2derma.lua:243: attempt to index field '?' (a nil value)
native = function()
local e2fun, extern, iextern = e2fun, extern, iextern
local environment = {}
setmetatable(environment, {
__index = function(_, id) error("attempt to read from global scope " .. id, 1) end,
__newindex = function(_, id) error("attempt to write to global scope " .. id, 1) end,
})
setfenv(1, environment)
local self
local __tmp
local __vars,__dlts,__clks
local __f={}
local __c={}
local __c_0=iextern("abs")
local __f_0=e2fun("op:ass(e)")
local __f_1=e2fun("entity()")
local __f_2=e2fun("holoCreate(n)")
local __f_3=e2fun("holoModelAny(ns)")
local __f_4=e2fun("holoScaleUnits(nv)")
local __f_5=e2fun("holoPos(nv)")
local __f_6=e2fun("toWorld(e:v)")
local __f_7=e2fun("holoParent(ne)")
local __f_8=e2fun("holoMaterial(ns)")
local __f_9=e2fun("holoRenderFX(nn)")
local __f_a=e2fun("holoColor(nv)")
local __f_b=e2fun("holoAlpha(nn)")
local __f_c=e2fun("op:ass(s)")
local __f_d=e2fun("holoModel(ns)")
local __f_e=e2fun("interval(n)")
local __f_f=e2fun("op:eq(ss)")
local __f_g=e2fun("changed(s)")
local __f_h=e2fun("sin(n)")
local __f_i=e2fun("cos(n)")
__c['0']={nil,{function() return 1 end},{function() return "models/props_phx/ball.mdl" end}}
__c['1']={nil,'Mode',{function() return "charge" end}}
__c['2']={nil,{function() return __vars['Mode'] end},{function() return "charge" end}}
__c['3']={nil,{function() return __vars['Mode'] end}}
__c['4']={nil,{function() return __vars['Z'] end}}
__c['5']={nil,'Mode',{function() return "charged" end}}
__c['6']={nil,{function() return __vars['Mode'] end},{function() return "charged" end}}
return function(context)
self=context
__vars,__dlts,__clks=self.vars,self.dltvars,self.vclk
if (self.entity.first == true) then __f_0(self,'E',__f_1(self))
__f_2(self,1)
__f_3(self,__c['0'])
__f_4(self,1,{100, 100, 100})
__f_5(self,1,__f_6(self,__vars['E'],{0, 0, 80}))
__f_7(self,1,__vars['E'])
__f_8(self,1,"models/debug/debugwhite")
__f_9(self,1,4)
__f_a(self,1,{255, 0, 0})
__f_b(self,1,150)
__f_c(self,__c['1'])
__f_2(self,2)
__f_d(self,2,"hqcylinder2")
__f_4(self,2,{10, 10, 10})
__f_5(self,2,__f_6(self,__vars['E'],{0, 0, 80}))
__f_7(self,2,__vars['E'])
__f_8(self,2,"models/debug/debugwhite")
__f_a(self,2,{255, 0, 0})
__f_b(self,2,255)
end
__f_e(self,100)
__vars['Z'] = (__vars['Z'] + 0.1)
if __f_f(self,__c['2']) then if (__f_g(self,__c['3']) != 0) then __vars['Z'] = 0
end
__f_a(self,1,{(255 * __f_h(self,__c['4'])), 0, (255 * __f_i(self,__c['4']))})
if (__c_0(__vars['Z'] - 90) <= 1e-007) then __f_c(self,__c['5'])
end
end
if __f_f(self,__c['6']) then if (__f_g(self,__c['3']) != 0) then __vars['Z'] = 0
end
__vars['Z'] = (__vars['Z'] + 1)
end
end
end On E2 code Code:
@name
@inputs
@outputs
@persist E:entity Mode:string Z
@trigger
@model models/Cerus/Modbridge/Misc/Engines/eng_sq11b.mdl
if (first()) {
E = entity()
holoCreate( 1)
holoModelAny( 1,"models/props_phx/ball.mdl")
holoScaleUnits(1,vec(100,100,100))
holoPos( 1,E:toWorld(vec(0,0,80)))
holoParent( 1,E)
holoMaterial( 1,"models/debug/debugwhite")
holoRenderFX( 1,4)
holoColor( 1,vec(255,0,0))
holoAlpha( 1,150)
Mode = "charge"
holoCreate( 2)
holoModel( 2,"hqcylinder2")
holoScaleUnits(2,vec(100,100,100))
holoPos( 2,E:toWorld(vec(0,0,80)))
holoParent( 2,E)
holoMaterial( 2,"models/debug/debugwhite")
holoRenderFX( 2,0)
holoColor( 2,vec(255,0,0))
holoAlpha( 2,255)
}
interval(100-Z)
Z += 0.1
if (Mode == "charge") {
if (changed(Mode)) {Z = 0}
holoColor(1,vec(255*sin(Z),0,255*cos(Z)))
if (Z == 90) {Mode = "charged"}
}
if (Mode == "charged") {
if (changed(Mode)) {Z = 0}
Z += 1
} I would have debugged, but it spammed me with
Bookmarks