Problem mit Standard Tools
Hallo liebe Community,
Folgendes:
Ich wollte gestern eine einfache Lampe erstellen.
Also habe ich das Lampen-Tool gewählt, den Bestimmungsort ausgewählt und Links klick.
Jetzt kommt es „...LUA fehler...“ , die Lampe spawned nicht.
Nun meine Frage: wie kriege ich das in den Griff?
P.S.: Gmod schon 2-mal neu aufgesetzt
Ich hoffe ihr könnt mir helfen
AW: Problem mit Standart Tools
Leute, gebt bitte IMMER den LUA-Error mit an. So können wir nicht helfen.
Könntest du außerdem den Inhalt der Datei \garrysmod\garrysmod\gamemodes\sandbox\entities\we apons\gmod_tool\stools\lamp.lua (Mit Editor öffnen) hierher kopieren oder die Datei selbst hochladen?
AW: Problem mit Standard Tools
Code:
TOOL.Category = "Construction"
TOOL.Name = "#Lamps"
TOOL.Command = nil
TOOL.ConfigName = ""
TOOL.ClientConVar[ "ropelength" ] = "64"
TOOL.ClientConVar[ "ropematerial" ] = "cable/rope"
TOOL.ClientConVar[ "r" ] = "255"
TOOL.ClientConVar[ "g" ] = "255"
TOOL.ClientConVar[ "b" ] = "255"
TOOL.ClientConVar[ "key" ] = "-1"
TOOL.ClientConVar[ "texture" ] = "effects/flashlight001"
cleanup.Register( "lamps" )
function TOOL:LeftClick( trace, attach )
if ( trace.Entity && trace.Entity:IsPlayer() ) then return false end
if ( CLIENT ) then return true end
if ( attach == nil ) then attach = true end
// If there's no physics object then we can't constraint it!
if ( SERVER && attach && !util.IsValidPhysicsObject( trace.Entity, trace.PhysicsBone ) ) then return false end
local ply = self:GetOwner()
local pos, ang = trace.HitPos + trace.HitNormal * 10, trace.HitNormal:Angle() - Angle( 90, 0, 0 )
local r = math.Clamp( self:GetClientNumber( "r" ), 0, 255 )
local g = math.Clamp( self:GetClientNumber( "g" ), 0, 255 )
local b = math.Clamp( self:GetClientNumber( "b" ), 0, 255 )
local key = self:GetClientNumber( "key" )
local texture = self:GetClientInfo( "texture" )
if trace.Entity:IsValid() &&
trace.Entity:GetClass() == "gmod_lamp" &&
trace.Entity:GetPlayer() == ply
then
trace.Entity:SetLightColor( r, g, b )
trace.Entity.r = r
trace.Entity.g = g
trace.Entity.b = b
trace.Entity:SetFlashlightTexture( texture )
return true
end
if ( !self:GetSWEP():CheckLimit( "lamps" ) ) then return false end
lamp = MakeLamp( ply, r, g, b, key, texture, { Pos = pos, Angle = ang } )
if (!attach) then
undo.Create("Lamp")
undo.AddEntity( lamp )
undo.SetPlayer( self:GetOwner() )
undo.Finish()
return true
end
local length = self:GetClientNumber( "ropelength" )
local material = self:GetClientInfo( "ropematerial" )
local LPos1 = Vector( 0, 0, 5 )
local LPos2 = trace.Entity:WorldToLocal( trace.HitPos )
if (trace.Entity:IsValid()) then
local phys = trace.Entity:GetPhysicsObjectNum( trace.PhysicsBone )
if (phys:IsValid()) then
LPos2 = phys:WorldToLocal( trace.HitPos )
end
end
local constraint, rope = constraint.Rope( lamp, trace.Entity,
0, trace.PhysicsBone,
LPos1, LPos2,
0, length,
0,
1.5,
material,
nil )
undo.Create("Lamp")
undo.AddEntity( lamp )
undo.AddEntity( rope )
undo.AddEntity( constraint )
undo.SetPlayer( ply )
undo.Finish()
return true
end
function TOOL:RightClick( trace )
return self:LeftClick( trace, false )
end
if ( SERVER ) then
function MakeLamp( pl, r, g, b, KeyDown, Texture, Data )
if ( !pl:CheckLimit( "lamps" ) ) then return false end
local lamp = ents.Create( "gmod_lamp" )
if (!lamp:IsValid()) then return end
lamp:SetFlashlightTexture( Texture )
duplicator.DoGeneric( lamp, Data )
lamp:SetLightColor( r, g, b )
lamp:Spawn()
duplicator.DoGenericPhysics( lamp, pl, Data )
lamp:SetPlayer( pl )
pl:AddCount( "lamps", lamp )
pl:AddCleanup( "lamps", lamp )
lamp.Texture = Texture
lamp.KeyDown = KeyDown
lamp.KeyBind = numpad.OnDown( pl, KeyDown, "LampToggle", lamp )
return lamp
end
duplicator.RegisterEntityClass( "gmod_lamp", MakeLamp, "lightr", "lightg", "lightb", "KeyDown", "Texture", "Data" )
local function Toggle( pl, ent, onoff )
if ( !ValidEntity( ent ) ) then return false end
return ent:Toggle()
end
numpad.Register( "LampToggle", Toggle )
end
function TOOL.BuildCPanel( CPanel )
// HEADER
CPanel:AddControl( "Header", { Text = "#Tool_lamp_name", Description = "#Tool_lamp_desc" } )
// Presets
local params = { Label = "#Presets", MenuButton = 1, Folder = "lamp", Options = {}, CVars = {} }
params.Options.default = {
lamp_ropelength = 64,
lamp_ropematerial = "cable/rope",
lamp_texture = "effects/flashlight001",
lamp_r = 255,
lamp_g = 255,
lamp_b = 255,
lamp_key = -1
}
table.insert( params.CVars, "lamp_ropelength" )
table.insert( params.CVars, "lamp_ropematerial" )
table.insert( params.CVars, "lamp_texture" )
table.insert( params.CVars, "lamp_r" )
table.insert( params.CVars, "lamp_g" )
table.insert( params.CVars, "lamp_b" )
table.insert( params.CVars, "lamp_key" )
CPanel:AddControl( "ComboBox", params )
CPanel:NumSlider( "#Rope Length", "lamp_ropelength", 0, 256, 2 )
CPanel:AddControl( "Color", { Label = "#Color",
Red = "lamp_r",
Green = "lamp_g",
Blue = "lamp_b",
ShowAlpha = 0,
ShowHSV = 1,
ShowRGB = 1,
Multiplier = 255 } )
CPanel:AddControl( "Numpad", { Label = "#Toggle", Command = "lamp_key", ButtonSize = 22 } )
local MatSelect = CPanel:MatSelect( "lamp_texture", nil, true, 0.33, 0.33 )
for k, v in pairs( list.Get( "LampTextures" ) ) do
MatSelect:AddMaterial( v.Name or k, k )
end
end
list.Set( "LampTextures", "effects/flashlight001", { Name = "Default" } )
list.Set( "LampTextures", "effects/flashlight/slit", { Name = "Slit" } )
list.Set( "LampTextures", "effects/flashlight/circles", { Name = "Circles" } )
list.Set( "LampTextures", "effects/flashlight/window", { Name = "Window" } )
list.Set( "LampTextures", "effects/flashlight/logo", { Name = "Logo" } )
list.Set( "LampTextures", "effects/flashlight/gradient", { Name = "Gradient" } )
list.Set( "LampTextures", "effects/flashlight/bars", { Name = "Bars" } )
list.Set( "LampTextures", "effects/flashlight/tech", { Name = "Techdemo" } )
Hier hoffe das hilft...bin imma noch dabei gmod neu zu machen vlt. is es dann ja weg...:-?
AW: Problem mit Standard Tools
Zitat:
Leute, gebt bitte IMMER den LUA-Error mit an. So können wir nicht helfen.
AW: Problem mit Standart Tools
Zitat:
Zitat von
Joker
Könntest du außerdem den Inhalt der Datei \garrysmod\garrysmod\gamemodes\sandbox\entities\we apons\gmod_tool\stools\lamp.lua (Mit Editor öffnen) hierher kopieren oder die Datei selbst hochladen?
Hab ich und ich kann gerade nich in gmod um den error zu kopieren...da es noch installet
AW: Problem mit Standard Tools
Die Fehlermeldung ist aber dazu wichtig, dass wir erkennen können, woran der Fehler liegt. Melde dich wieder, sobald du es hast.
AW: Problem mit Standard Tools
Btw: Wenn schon neuinstallieren, dann richtig. Von Hand löschen und per Steam. Dann ists auch wirklich sauber.
AW: Problem mit Standard Tools
So hier is der screen:
http://www.garrysmod.de/forum/pictur...&pictureid=736
P.S: Ich habs neu geistalled....und es ist imma noch...:-?
AW: Problem mit Standard Tools
So wie es aussieht ist das keine originale Version von Garrys Mod 10 sondern eine gecrackte, da die Funktion Player List nicht in der legalen version enthalten ist. (wenn ich mich irre bitte aufklären)
AW: Problem mit Standard Tools
Zitat:
Zitat von
TheStargater
So wie es aussieht ist das keine originale Version von Garrys Mod 10 sondern eine gecrackte, da die Funktion Player List nicht in der legalen version enthalten ist. (wenn ich mich irre bitte aufklären)
oO...was ist los...look at steam acc.......was soll ich mit warze!
http://steamcommunity.com/profiles/76561197994694790
Diese Unterstellung wirklich Dreist..:|
Ich weiss das es heir kein support für sowas gibt....was ich im übrigen echt klasse finde ;)
btw.: Da bist du immer ganz schnell wa...hat in deinen Augen hier gleich jeder eine gecrackte Version der ein Problem hat?
AW: Problem mit Standard Tools
Hm ich hab mich vertan, tut mir leid.
Die letzte Möglichkeit wäre, dass du dir Garrys Mod nochmal komplett von Steam herunterlädst, vielleicht ist irgendwas mit der GMod GCF Datei.
AW: Problem mit Standard Tools
So jetzt 4. mal geladen und neu gemacht ich teste mal fix...:-?
AW: Problem mit Standard Tools
Wenn des nicht funktioniert hat, dann poste mal deinen ganzen Konsoleninhalt.
AW: Problem mit Standard Tools
So diese mal ohne addon gestartet und es geht...vlt. liegt es an einem Addon...mal sehen welches das ist....wenn ichs hab poste ich nochmal vlt. haben andere ja auch dieses problem...:)
AW: Problem mit Standard Tools
Also GMod neu aufzusetzen und dann mit Addons vollzupumpen und es erst dann
zu starten und dann hier wieder ankommen und sagen "blubb Fehler ist immer noch da" ist nicht gerade sehr klug...
Probier es mit einer Vanilla ( Sauberen ) Installation aus OHNE jegliche Addons,
erst dann ist gewährleistet das der Fehler an GMod liegt und nicht an einem Addon...
AW: Problem mit Standard Tools
So...nun hab ausreichend getestet und es lag an einem npc pack:|
Ach ja und natürlich hab ich es erst ohne Addons gestartet komischerweise war er immer noch da...hat mich sehr irritiert...deswegen hab ich noch mal gepostet
Jetzt (das 4.mal Übrigens) funktioniert wieder alles:D
Trotzdem danke für eure hilfe:)
AW: Problem mit Standard Tools
Zitat:
Zitat von
TheStargater
So wie es aussieht ist das keine originale Version von Garrys Mod 10 sondern eine gecrackte, da die Funktion Player List nicht in der legalen version enthalten ist. (wenn ich mich irre bitte aufklären)
Aber sonst gehts noch oder?