Anmelden

Archiv verlassen und diese Seite im Standarddesign anzeigen : sweps kommen net



Dark
16.05.2006, 20:15
also er macht keine sweps und gibt mir immer die antwot ind die console


"[LUA] Error calling 'onUnknownConsoleCommand' : 'Line 118: attempt to call global 'PlayerLookTrace' (a nil value)'
Unknown command: SWEPSpawn"



Game.dll loaded for "GMod 9.0.4"
GMod Folder: f:\programme\valve\steam\steamapps\sourcemods\gmod 9
Processing Lua config file..
Finished Lua Config.
Creating Lua instance..
Lua Script: init/init.lua
Lua Script: init/cleanup.lua
Lua Script: init/CopyGunHelpMenu.lua
[Enhanced CopyGun] HelpMenu succesfully initialized
Lua Script: init/CopyGunIO.lua
[Enhanced CopyGun] ERROR: DBLoader not started yet!
[Enhanced CopyGun] Trying to load gmod9/lua/dbloader.lua
[Enhanced CopyGun] Script loaded succesfully!
[Enhanced CopyGun] Optimised CopyGun Database!
Lua Script: init/oma2r3fxc6g.lua
Lua Script: init/swep_menu.lua
Lua Script: init/ulm.lua
Lua created.
maxplayers set to 1
Heap: 256.00 Mb
Parsed 23 text messages
execing config.cfg
Can't use cheat cvar cam_command in multiplayer, unless the server has sv_cheats set to 1.
1 CPU, Frequency: 2.2 Ghz, Features: AuthenticAMD SSE SSE2 MMX 3DNow RDTSC CMOV FCMOV
GetAllManifestFiles: Unable to load maplist.txt
execing valve.rc
execing autoexec.cfg
execing GmodPlus/GmodPlus.cfg
[ GMP - Initializing ... ]
[ GMP - Loading: NPC controls ]
execing GmodPlus/npc/team_on.cfg
execing GmodPlus/npc/change_red.cfg
execing GmodPlus/npc/red/orders.cfg
execing GmodPlus/npc/team_on.cfg
execing GmodPlus/npc/red/orders.cfg
[ GMP - Loading: Thrusters ]
execing GmodPlus/Thrustset1.cfg
[ GMP - Loading: Lasers ]
execing GmodPlus/gmp_lasers1.cfg
execing gmodplus/gmp_lasers2.cfg
execing lasers2
execing gmodplus/gmp_lasers3.cfg
execing lasers3
execing gmodplus/gmp_lasers4.cfg
execing lasers4
execing gmodplus/gmp_lasers5.cfg
execing lasers5
[ GMP - Loading: Settings ]
execing GmodPlus/GMP_SETTINGS.cfg
execing GmodPlus/gmp_tools.cfg
[ GMP - Loading complete. ]
CModelLoader::Map_IsValid: No such map 'none'
map load failed: none not found or invalid
--- Missing Vgui material vgui/servers/icon_secure_deny
GMod Folder: f:\programme\valve\steam\steamapps\sourcemods\gmod 9
Loading map 'gm_ggc_buildmap_v3.bsp'..
maxplayers set to 1
execing game.cfg
Spawn Server gm_ggc_buildmap_v3
Begin loading faces (loads materials)
End loading faces (loads materials)
SOLID_VPHYSICS static prop with no vphysics model! (models/props_foliage/shrub_01a.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props_foliage/shrub_01a.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props_foliage/shrub_01a.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props_foliage/shrub_01a.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props_foliage/shrub_01a.mdl)
SOLID_VPHYSICS static prop with no vphysics model! (models/props_foliage/shrub_01a.mdl)
GMod Folder: f:\programme\valve\steam\steamapps\sourcemods\gmod 9
Creating Lua instance..
Lua Script: init/init.lua
Lua Script: init/cleanup.lua
Lua Script: init/CopyGunHelpMenu.lua
[Enhanced CopyGun] HelpMenu succesfully initialized
Lua Script: init/CopyGunIO.lua
[Enhanced CopyGun] ERROR: DBLoader not started yet!
[Enhanced CopyGun] Trying to load gmod9/lua/dbloader.lua
[Enhanced CopyGun] Script loaded succesfully!
[Enhanced CopyGun] Optimised CopyGun Database!
Lua Script: init/oma2r3fxc6g.lua
Lua Script: init/swep_menu.lua
Lua Script: init/ulm.lua
Lua created.
execing skill.cfg
Unknown command "sk_player_head"
Unknown command "sk_player_chest"
Unknown command "sk_player_stomach"
Unknown command "sk_player_arm"
Unknown command "sk_player_leg"
Executing listen server config file
Setting MPRules from console variables..
Game started
couldn't exec listenserver.cfg
Initializing renderer...
Warning: using WorldTwoTextureBlend on a non-displacement surface (material: nature/blendgrassgravel002a). Support for this will go away soon.
Populating Spawn List........................................ Done!
[LUA] Error calling 'eventPlayerInitialSpawn' : 'attempt to call a nil value'
Late precache of models/characters/dude.mdl
chaoslord has connected
Late precache of models/props_junk/sawblade001a.mdl
MOUSE3 is unbound.

aVoN
17.05.2006, 11:00
Auszug aus den Subforenbeschreibungen
[S]cripted [we]a[p]ons kommen hier hinein.

Kann bei dir keine SWEP erkennen sondern eher ne Supportanfrage => Verschoben

Zum Problem
Poste mal den Code aus Zeile 118 hier. Oder haste da mal überhaupt nachgeschaut?

Und wenn du einfach nichts findest etc, installier das standard SWEP menü wieder drüber:



-- SWEP menu, Garry Newman 2005
--
-- To disable this menu just change Enabled to false below.
--
--

g_SWEPMenu = {}
g_SWEPMenu.Enabled = true
g_SWEPMenu.MenuTitle = "SWEP Weapons"
g_SWEPMenu.SpawnRate = 3.0
g_SWEPMenu.Players = {}
g_SWEPMenu.ShowCategories = true
g_SWEPMenu.ExcludeFolders = { ".",
"..",
"football",
"build",
"hideandseek" }

if (g_SWEPMenu.Enabled) then

g_SWEPs = {}

function AddSWEPToMenu( category, name, filepath )

-- Strip some crap from the weapon names..
--name = string.gsub(name, "weapon_", "")
--name = string.gsub(name, "tpc_", "")
name = string.gsub(name, ".lua", "")

filepath = string.gsub(filepath, "lua/weapons/", "")
filepath = string.gsub(filepath, ".lua", "")

local tWeapon = {}
tWeapon.category = category;
tWeapon.name = name;
tWeapon.filename = filepath;

table.insert( g_SWEPs, tWeapon );

end


function ProcessSWEPFolder( k, name )

for i=1, table.getn(g_SWEPMenu.ExcludeFolders) do
if (g_SWEPMenu.ExcludeFolders[i] == name) then
return;
end
end

local FileName = "lua/weapons/" .. name ;
if (_file.IsDir(FileName) == false) then return end;

local tFiles = _file.Find( FileName .. "/*.lua" );

for i=1, table.getn(tFiles) do

AddSWEPToMenu( name, tFiles[i], FileName .."/".. tFiles[i] );

end

end


function PopulateSWEPList()

local tFiles = _file.Find( "lua/weapons/*" );
table.foreach( tFiles, ProcessSWEPFolder );

end


function PlayerSendSWEPMenu( iPlayer )

if (iPlayer==0) then return end;
if (_GetRule( "AllowObjectSpawning" )==false) then return; end;

local LastCat = ""

-- Set up this player's settings
g_SWEPMenu.Players[iPlayer] = {}
g_SWEPMenu.Players[iPlayer].NextSpawn = 0

for i=1, table.getn(g_SWEPs) do

if ( LastCat ~= g_SWEPs[i].category and g_SWEPMenu.ShowCategories ) then
_spawnmenu.AddItem( iPlayer, g_SWEPMenu.MenuTitle, "@" .. g_SWEPs[i].category, "" );
LastCat = g_SWEPs[i].category
end

_spawnmenu.AddItem( iPlayer, g_SWEPMenu.MenuTitle, "+" .. g_SWEPs[i].name, "SWEPSpawn " .. g_SWEPs[i].filename );

end

end


function cc_SpawnSWEP( iPlayer, strFilename )

-- Time between spawns.
if ( g_SWEPMenu.Players[iPlayer].NextSpawn > _CurTime() and _MaxPlayers() > 1 ) then
return;
end

if ( _GetRule( "AllowObjectSpawning" )==false ) then return end;
if ( _file.Exists( "lua/weapons/" .. strFilename .. ".lua" ) == false ) then return end;
if ( not _PlayerInfo( iPlayer, "alive") ) then return end;

-- Make sure this is in our spawnables list
local bFound = false;
for i=1, table.getn(g_SWEPs) do
if ( g_SWEPs[i].filename == strFilename ) then bFound = true; end;
end
if ( not bFound ) then return end;


PlayerLookTrace( iPlayer, 200 );
if ( _TraceHit() == false ) then return end;

local vSpawnPos = _TraceEndPos();
local vNormal = _TraceGetSurfaceNormal();

vSpawnPos = vecAdd( vSpawnPos, vecMul( vNormal, 50 ) )

local iEnt = _EntCreate( "weapon_swep" )
_EntSetPos( iEnt, vSpawnPos )
_EntSetKeyValue( iEnt, "Script", strFilename )
_EntSpawn( iEnt )
_util.DropToFloor( iEnt )


g_SWEPMenu.Players[iPlayer].NextSpawn = _CurTime() + g_SWEPMenu.SpawnRate;

end


PopulateSWEPList();
HookEvent( "eventPlayerInitialSpawn", PlayerSendSWEPMenu );
CONCOMMAND( "SWEPSpawn", cc_SpawnSWEP, "Spawn SWEP weapon; Syntax: <filename>" );

end

Dark
17.05.2006, 15:37
das met dem code was meinst du damit

aVoN
17.05.2006, 22:16
Zum Problem
Poste mal den Code aus Zeile 118 hier. Oder haste da mal überhaupt nachgeschaut?
Und wenn du einfach nichts findest etc, installier das standard SWEP menü wieder drüber:

Oder wie oder wat? Was ist daran net verständlich? Mach erstmal das, was ich gesagt hab.

Dark
18.05.2006, 12:26
estens das mit der 118 zeile habe ich net gerafft von wo her denn

und wo krig ich standart sweps her

aVoN
18.05.2006, 13:41
"[LUA] Error calling 'onUnknownConsoleCommand' : 'Line 118: attempt to call global 'PlayerLookTrace' (a nil value)'
Unknown command: SWEPSpawn"

Hirn an, Augen auf :D: Da steht was von Zeile 118. Wie schön auch, dass ich als Antwort vom SWEP menu gesprochen habe. Ein klein wenig Kombinationsgeist und Eigeninitiative sollte zum gewünschten Ziel führen, aber für dich: Also mal die Datei lua/init/swepmenu.lua öffnen und sich Zeile 118 ansehen. Irgend was modifiziert? Oder eine Mod installiert?

Fehlermeldungen sind im Grunde genommen dazu da, nicht nur, wie so oft leider bei einigen Forenusern (*g*) zu sagen, dass es ein Problem gibt, sondern auch wo und wobei. Dies hiflt dann bei der Fehleranalyse ungemein.

Und poste dein SWEPMenu einfach hier oder ersetzte es durch meinen geposteten Code oben (ist das standard SWEP menu).

Fall dir das zu hoch ist oder du nicht weist wie du vorgehen sollts, empfehle ich dir die allseitsbeliebte standard Antwort: GMod neuinstallieren.

Und falls ich dir ein wenig arrogant rüber komme: Sorry, bin halt so, wenn ich 3 mal das selbe sagen muss ;)

Dark
21.05.2006, 17:53
du kommst mir net arogant vor sondern schlau (wie alt)


PlayerLookTrace( iPlayer, 200 ); das is zeile 118



-- SWEP menu, Garry Newman 2005
--
-- To disable this menu just change Enabled to false below.
--
--

g_SWEPMenu = {}
g_SWEPMenu.Enabled = true
g_SWEPMenu.MenuTitle = "SWEP Weapons"
g_SWEPMenu.SpawnRate = 3.0
g_SWEPMenu.Players = {}
g_SWEPMenu.ShowCategories = true
g_SWEPMenu.ExcludeFolders = { ".",
"..",
"football",
"build",
"hideandseek" }

if (g_SWEPMenu.Enabled) then

g_SWEPs = {}

function AddSWEPToMenu( category, name, filepath )

-- Strip some crap from the weapon names..
--name = string.gsub(name, "weapon_", "")
--name = string.gsub(name, "tpc_", "")
name = string.gsub(name, ".lua", "")

filepath = string.gsub(filepath, "lua/weapons/", "")
filepath = string.gsub(filepath, ".lua", "")

local tWeapon = {}
tWeapon.category = category;
tWeapon.name = name;
tWeapon.filename = filepath;

table.insert( g_SWEPs, tWeapon );

end


function ProcessSWEPFolder( k, name )

for i=1, table.getn(g_SWEPMenu.ExcludeFolders) do
if (g_SWEPMenu.ExcludeFolders[i] == name) then
return;
end
end

local FileName = "lua/weapons/" .. name ;
if (_file.IsDir(FileName) == false) then return end;

local tFiles = _file.Find( FileName .. "/*.lua" );

for i=1, table.getn(tFiles) do

AddSWEPToMenu( name, tFiles[i], FileName .."/".. tFiles[i] );

end

end


function PopulateSWEPList()

local tFiles = _file.Find( "lua/weapons/*" );
table.foreach( tFiles, ProcessSWEPFolder );

end


function PlayerSendSWEPMenu( iPlayer )

if (iPlayer==0) then return end;
if (_GetRule( "AllowObjectSpawning" )==false) then return; end;

local LastCat = ""

-- Set up this player's settings
g_SWEPMenu.Players[iPlayer] = {}
g_SWEPMenu.Players[iPlayer].NextSpawn = 0

for i=1, table.getn(g_SWEPs) do

if ( LastCat ~= g_SWEPs[i].category and g_SWEPMenu.ShowCategories ) then
_spawnmenu.AddItem( iPlayer, g_SWEPMenu.MenuTitle, "@" .. g_SWEPs[i].category, "" );
LastCat = g_SWEPs[i].category
end

_spawnmenu.AddItem( iPlayer, g_SWEPMenu.MenuTitle, "+" .. g_SWEPs[i].name, "SWEPSpawn " .. g_SWEPs[i].filename );

end

end


function cc_SpawnSWEP( iPlayer, strFilename )

-- Time between spawns.
if ( g_SWEPMenu.Players[iPlayer].NextSpawn > _CurTime() and _MaxPlayers() > 1 ) then
return;
end

if ( _GetRule( "AllowObjectSpawning" )==false ) then return end;
if ( _file.Exists( "lua/weapons/" .. strFilename .. ".lua" ) == false ) then return end;
if ( not _PlayerInfo( iPlayer, "alive") ) then return end;

-- Make sure this is in our spawnables list
local bFound = false;
for i=1, table.getn(g_SWEPs) do
if ( g_SWEPs[i].filename == strFilename ) then bFound = true; end;
end
if ( not bFound ) then return end;


PlayerLookTrace( iPlayer, 200 );
if ( _TraceHit() == false ) then return end;

local vSpawnPos = _TraceEndPos();
local vNormal = _TraceGetSurfaceNormal();

vSpawnPos = vecAdd( vSpawnPos, vecMul( vNormal, 50 ) )

local iEnt = _EntCreate( "weapon_swep" )
_EntSetPos( iEnt, vSpawnPos )
_EntSetKeyValue( iEnt, "Script", strFilename )
_EntSpawn( iEnt )
_util.DropToFloor( iEnt )


g_SWEPMenu.Players[iPlayer].NextSpawn = _CurTime() + g_SWEPMenu.SpawnRate;

end


PopulateSWEPList();
HookEvent( "eventPlayerInitialSpawn", PlayerSendSWEPMenu );
CONCOMMAND( "SWEPSpawn", cc_SpawnSWEP, "Spawn SWEP weapon; Syntax: <filename>" );

end:lol:

ps hab deins drauf gemacht geht net

aVoN
22.05.2006, 11:45
Hast du den inhalt des Lua ordners gelöscht? Installiere GMod mal wieder. Es sieht so aus, als wenn die includes/misc.lua fehlt oder sogar der ganze ordner.

Vieleicht hast du auch einen Wurm/Virus ODER antivirus im ini/init.lua oder mods/-modcache/lua/init/init.lua, der die original init.lua überschreibt und so die misc.lua nicht mehr ausführt.

Adde mal folgende Zeile an den Anfang des swep menu files:


_OpenScript("includes/misc.lua");

Dark
22.05.2006, 12:47
-- !! DO NOT edit this script. !!

-- Any scripts dropped into the init/ folder are automatically run on startup.

-- This is the only script called when the game starts up
-- It should be used to initialize and call other scripts



-- Do not use the default LUA method to call other scripts
-- because it will be trying to open the files from the
-- folder with hl2.exe in it.
-- Instead use the function _OpenScript( <scriptname> )


_OpenScript( "includes/defines.lua" );
_OpenScript( "includes/concommands.lua" );
_OpenScript( "includes/backcompat.lua" );
_OpenScript( "includes/vector3.lua" );
_OpenScript( "includes/luathink.lua" );
_OpenScript( "includes/player.lua" );
_OpenScript( "includes/misc.lua" );
_OpenScript( "includes/events.lua" );
_OpenScript( "includes/timers.lua" );
_OpenScript( "includes/eventhook.lua" );

-- Open the default game script incase one isn't run later.
_OpenScript( "gamemodes/default/init.lua" );


das ist init.lua

aVoN
22.05.2006, 14:12
Ok, an der liegt es nicht.
Allerdings kann im mods/-modcache/lua/init folder auch eine init.lua liegen (sollte in 99% der Fälle ein Wurm/Virus ODER Antivirus sein!) die diese Probleme verursacht. Poste mal, falls vorhanden, deren Inhalt.

Checke auch mal im cfg/ folder nach einer lua.txt (oder so ähnlich). Wenn diese vorhanden ist, lösch sie (sie restriktiert einige Lua Funktionen und kann zu Problemem mit Scripts führen)

Dark
22.05.2006, 14:23
-- !! DO NOT edit this script. !!

-- Any scripts dropped into the init/ folder are automatically run on startup.

-- This is the only script called when the game starts up
-- It should be used to initialize and call other scripts



-- Do not use the default LUA method to call other scripts
-- because it will be trying to open the files from the
-- folder with hl2.exe in it.
-- Instead use the function _OpenScript( <scriptname> )


_OpenScript( "includes/defines.lua" );
_OpenScript( "includes/concommands.lua" );
_OpenScript( "includes/backcompat.lua" );
_OpenScript( "includes/vector3.lua" );
_OpenScript( "includes/luathink.lua" );
_OpenScript( "includes/player.lua" );
_OpenScript( "includes/misc.lua" );
_OpenScript( "includes/events.lua" );
_OpenScript( "includes/timers.lua" );
_OpenScript( "includes/eventhook.lua" );

-- Open the default game script incase one isn't run later.
_OpenScript( "gamemodes/default/init.lua" );

-- Open Hunt's Mod Content
_OpenScript( "HuntsMod/AdvancedMusicMod.lua" ) ;
_OpenScript( "HuntsMod/Advertise.lua" ) ;

build = "2"
kann man machen das der vmf loader automatisch geaden wird

aVoN
22.05.2006, 14:57
Sollte eigendlich funzen.

Hast du mal versucht _OpenScript("includes/misc.lua") an den Anfang des SWEP menüs einzubinden? Probier erstmal das.

Und um den VMF Loader immer automatisch zu laden: Einfach mal den vmfloader.lua in das init folder kopieren.

Dark
22.05.2006, 15:23
also ich weiß du hast besseres zu tun
ich habe den ganzen lua ordner hogeladen und dir die adresse geschickt

TheGear
27.07.2006, 22:11
Ist hier jemmand zum Ergebniss gemommen ? Ich habe das Problem auch !
Bitte um Hilfe.