• Gamemode Errors
    6 replies, posted
I recently had an idea for a gamemode and have made good progress on it however i have one big problem, cl_init.lua will not load. Error message: Couldn't include file 'Fort Wars\gamemode\cl_init.lua' (File not found) [cpp] There was a problem opening the gamemode file 'Fort Wars/gamemode/cl_init.lua' cl_init.lua code: include('shared.lua') function set_team() Teammenu = vgui.Create("DFrame") Teammenu:SetPos( ScrW()/2, ScrH()/2) Teammenu:SetSize( 350, 150 ) Teammenu:SetTitle( "Choose your team or press the x to spectate. If the button does nothing that team has more players than the other. Once joining a team you may not return to spectate until next round. Type bind teamchoose '<button of your choice>' in the console, to bring the menu back up with <button of your choice>." ) Teammenu:SetVisible( true ) Teammenu:SetDraggable( false ) Teammenu:ShowCloseButton( true ) Teammenu:MakePopup() T1 = vgui.Create( "DButton", Teammenu ) T1:SetPos( 20, 25 ) T1:SetSize( 140, 40 ) T1:SetText( "Team One" ) T1.DoClick = function() if team.NumPlayers(1) - team.NumPlayers(2) < 1 then // if team 1 has less than 1 extra player allow it RunConsoleCommand( "j_team1" ) else return end end T2 = vgui.Create( "DButton", Teammenu ) T2:SetPos( 40, 50 ) T2:SetSize( 140, 40 ) T2:SetText( "Team Two" ) T2.DoClick = function() if team.NumPlayers(2) - team.NumPlayers(1) < 1 // if team 2 has less than 1 extra player allow it RunConsoleCommand( "j_team2" ) else return end end end concommand.Add( "teamchoose", set_team )
First, use [lua] tags. Second, there should be a different error above that one, tell us what that one says.
[QUOTE=PortalGod;27401685]First, use [lua] tags. Second, there should be a different error above that one, tell us what that one says.[/QUOTE] LuaGetfile: Not Loading Fort Wars\gamemode\cl_init.lua and the [cpp] tag was part of the error message i recognize the c ++ file format but dont know what it means in this case
Remove the space in your gamemode folder name.
i did i don't know why its still showing up with the space in the errors
problem resolved it was the space thing apparently i had forgot to change info_gamemode in hammer to without spaces and since it was the only map i was testing the gamemode on it failed
well looks like after all that wwork someones already created my gamemode
Sorry, you need to Log In to post a reply to this thread.