• Problems That Don't Need Their Own Thread v2.0
    5,020 replies, posted
While messing with my entity i got this: Someone know how to fix this? [CODE] [ERROR] addons/strange sweps/lua/entities/entity_timed_grenade.lua:41: '(' expected near 'ENT' 1. unknown - addons/strange sweps/lua/entities/entity_timed_grenade.lua:0 [/CODE] [CODE]AddCSLuaFile() ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.Spawnable = false function ENT:Draw() if SERVER then return end self:DrawModel() end function ENT:Initialize() self:SetModel( "models/Items/grenadeAmmo.mdl" ) self:PhysicsInit( SOLID_VPHYSICS ) -- Make us work with physics, self:SetMoveType( MOVETYPE_VPHYSICS ) -- after all, gmod is a physics self:SetSolid( SOLID_VPHYSICS ) -- Toolbox local phys = self:GetPhysicsObject() if (phys:IsValid()) then phys:Wake() end end function ENT:Use( activator, caller ) return end function ENT:Think() timer.Simple(1, function ENT:Boom()) end end function ENT:Boom() local explo = ents.Create ("env_explosion") explo:SetPos(self.GetPos) explo:SetKeyValue( "iMagnitude", "220" ) explo:Spawn() end [/CODE]
[QUOTE=Garr;47182460]While messing with my entity i got this: Someone know how to fix this? [CODE] [ERROR] addons/strange sweps/lua/entities/entity_timed_grenade.lua:41: '(' expected near 'ENT' 1. unknown - addons/strange sweps/lua/entities/entity_timed_grenade.lua:0 [/CODE] -- code here --[/QUOTE] Like the error says, look at the area around line 41: [lua]function ENT:Think() timer.Simple(1, function ENT:Boom()) end end[/lua] This code is very wrong. For one thing, the format should be: [lua]timer.Simple(timerlength, function() -- code here end )[/lua] The other problem is that in order to call the function ENT:Boom() you should use: [lua]self:Boom()[/lua] ENT:Boom() will not work in this context.
[QUOTE=Neat-Nit;47182503]Like the error says, look at the area around line 41: [lua]function ENT:Think() timer.Simple(1, function ENT:Boom()) end end[/lua] This code is very wrong. For one thing, the format should be: [lua]timer.Simple(timerlength, function() -- code here end )[/lua] The other problem is that in order to call the function ENT:Boom() you should use: [lua]self:Boom()[/lua] ENT:Boom() will not work in this context.[/QUOTE] These really sound like stupid errors, but i'm a begginer, so, these are expected :smile: [editline]21st February 2015[/editline] Should i do like this? I tryed to put the self:Boom() code into the timer but it fails and say that Create is a nill value, so i just created that self:Boom() shit. But it doesn't seens to work either. This is the error i get: [CODE][ERROR] addons/strange sweps/lua/entities/entity_timed_grenade.lua:28: attempt to call method 'Boom' (a nil value) 1. unknown - addons/strange sweps/lua/entities/entity_timed_grenade.lua:28 Timer Failed! [Simple][@addons/strange sweps/lua/entities/entity_timed_grenade.lua (line 27)] [/CODE] [CODE]AddCSLuaFile() ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.Spawnable = false function ENT:Draw() if SERVER then return end self:DrawModel() end function ENT:Initialize() self:SetModel( "models/Items/grenadeAmmo.mdl" ) self:PhysicsInit( SOLID_VPHYSICS ) -- Make us work with physics, self:SetMoveType( MOVETYPE_VPHYSICS ) -- after all, gmod is a physics self:SetSolid( SOLID_VPHYSICS ) -- Toolbox local phys = self:GetPhysicsObject() if (phys:IsValid()) then phys:Wake() timer.Simple(1, function() self:Boom() end) end end end function ENT:Use( activator, caller ) return end function ENT:Think() end self:Boom() local explo = ents.Create ("env_explosion") explo:SetPos(self.GetPos) explo:SetKeyValue( "iMagnitude", "220" ) explo:Spawn() end [/CODE] Just put the boom shit in function just like this: [CODE]function self:Boom() local explo = ents.Create ("env_explosion") explo:SetPos(self.GetPos) explo:SetKeyValue( "iMagnitude", "220" ) explo:Spawn() end [/CODE] Now it gets me this:[CODE][ERROR] addons/strange sweps/lua/entities/entity_timed_grenade.lua:28: attempt to call method 'Boom' (a nil value) 1. unknown - addons/strange sweps/lua/entities/entity_timed_grenade.lua:28 Timer Failed! [Simple][@addons/strange sweps/lua/entities/entity_timed_grenade.lua [/CODE]
It seems that util.ParticleTracer will always start from ( 0, 0, 0 ) regardless of the start and endpos I create. [code]util.ParticleTracer( self.Primary.Tracer.Particle, pos, pos + ( v * deltaTime ), false )[/code] The end pos is totally fine - it goes where I need it to. However, regardless of what I put for start pos, including straight up off-the-wall vectors that are no where close to the origin of the map, the effect will start from the origin and go to where I need it to. I've tried it with "vortigaunt_beam" as well as TF2 tracers.
[QUOTE=Neat-Nit;47182160] However, I think this is a bad approach here! I don't know what Spawn() does exactly, but I doubt it has anything to do with player respawning since it's an [url=http://wiki.garrysmod.com/page/Entity/Spawn]Entity function[/url] and not a Player function. I don't see any straightforward way to force a player to respawn, other than forcing him to click clientside, or maybe faking it on [url=http://wiki.garrysmod.com/page/GM/PlayerTick]GM:PlayerTick[/url]. But hey, I could be wrong. Experiment with it, see what you get![/QUOTE] Players are entities and ply:Spawn() will most definitely work here.
[QUOTE=Garr;47182521]These really sound like stupid errors, but i'm a begginer, so, these are expected :smile: [editline]21st February 2015[/editline] Should i do like this? I tryed to put the self:Boom() code into the timer but it fails and say that Create is a nill value, so i just created that self:Boom() shit. But it doesn't seens to work either. This is the error i get: [CODE][ERROR] addons/strange sweps/lua/entities/entity_timed_grenade.lua:28: attempt to call method 'Boom' (a nil value) 1. unknown - addons/strange sweps/lua/entities/entity_timed_grenade.lua:28 Timer Failed! [Simple][@addons/strange sweps/lua/entities/entity_timed_grenade.lua (line 27)] [/CODE] [CODE]AddCSLuaFile() ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.Spawnable = false function ENT:Draw() if SERVER then return end self:DrawModel() end function ENT:Initialize() self:SetModel( "models/Items/grenadeAmmo.mdl" ) self:PhysicsInit( SOLID_VPHYSICS ) -- Make us work with physics, self:SetMoveType( MOVETYPE_VPHYSICS ) -- after all, gmod is a physics self:SetSolid( SOLID_VPHYSICS ) -- Toolbox local phys = self:GetPhysicsObject() if (phys:IsValid()) then phys:Wake() timer.Simple(1, function() self:Boom() end) end end end function ENT:Use( activator, caller ) return end function ENT:Think() end self:Boom() local explo = ents.Create ("env_explosion") explo:SetPos(self.GetPos) explo:SetKeyValue( "iMagnitude", "220" ) explo:Spawn() end [/CODE] Just put the boom shit in function just like this: [CODE]function self:Boom() local explo = ents.Create ("env_explosion") explo:SetPos(self.GetPos) explo:SetKeyValue( "iMagnitude", "220" ) explo:Spawn() end [/CODE] Now it gets me this:[CODE][ERROR] addons/strange sweps/lua/entities/entity_timed_grenade.lua:28: attempt to call method 'Boom' (a nil value) 1. unknown - addons/strange sweps/lua/entities/entity_timed_grenade.lua:28 Timer Failed! [Simple][@addons/strange sweps/lua/entities/entity_timed_grenade.lua [/CODE][/QUOTE] To make a function that is called as self:Boom(), you don't define it as self:Boom, you define it as ENT:Boom(). For instance, if you wanted to run the function called ENT:Destroy() from WITHIN the ENT:Boom() function, like so: [lua] function ENT:Boom() self:Destroy() --Destroy THIS ent, or self! end function ENT:Destroy() --do stuff end [/lua] I can explain why in a bit, I'll edit this post... (loading a game of League and it finished.) :P [editline]sweg[/editline] Ok, so in Lua the things you know as "entities" are actually just special tables with special properties. When you define a scripted ENT in GMod using a separate file, like is done 99.9% of the time, the following steps occur: 1. Find every file to open in the lua/entities/* 2. Define ENT as a table. 3. Open the file and run its code. 4. After running this code, register the (now full) ENT table as an entity in the system. 5. Erase the ENT table, now that we've copied it. So now that we've added all our entities to the system, saving their tables to memory, we can make COPIES of our entities using ents.Create(). When we create a copy of an entity, the following happens: 1. Get the ENT table of the entity we're talking about (the class). 2. Make a copy of that entity's ENT table. 3. Do some internal source stuff to make an entity. 4. Attach that (copy of the) ENT table to the newly created copy of our entity. 5. Return the new copy of the entity. So let's say we have a function called ENT:Boom() in our entity, which is like this: [lua] function ENT:Boom() ENT:Destroy() end function ENT:Destroy() ENT:Remove() end [/lua] And let's say that we create a copy of that entity, called copyOfBomb. At some point, we call copyOfBomb:Boom(). The engine searches copyOfBomb for the function called Boom and runs it. But when it runs it, it gets down the function and it hits ENT:Destroy(). Now remember that we are using a COPY of that ENT table, and what was ENT no longer exists. Errors abound. What I didn't mention is that [highlight]when you run a function using a colon ( : ), the first argument passed to it IS THE TABLE.[/highlight] It follows this format: [lua] function table:Method(a,b) -- self is the first argument in this function. end --this is the same as... function table.Method(self,a,b) -- self is the first argument in this function. end table:Method(1,2) --This is the same as... table.Method(table, 1, 2) [/lua] That way, when we call copyOfBomb:Boom(), we're passing [I]what actual entity[/I] to run the code on in the form of self, and any reference to self within functions using ENT: refers to the copy of our entity in question. I hope that makes sense.
Can you be vac banned in garrys mod for using sweetfx? I am just making sure I know that garrys mod will only ban you for two things I think, which should be baconbot and something else.
[QUOTE=Austin1346;47181923]Hello everyone, this function gets called every "think" that the player is dead. How would i only make the timer run once instead of multiple timers being created, but still have it inside the PlayerDeathThink function? Thanks! [CODE]function GM:PlayerDeathThink( ply ) timer.Simple( 5, function() ply:Spawn(); end ) end[/CODE][/QUOTE] I helped him a while ago on Steam; here's the solution for those interested: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_systems/simple_delay_respawn_system/sv_delay_respawn_system.lua.html[/url]
[QUOTE=wauterboi;47183122]It seems that util.ParticleTracer will always start from ( 0, 0, 0 ) regardless of the start and endpos I create. [code]util.ParticleTracer( self.Primary.Tracer.Particle, pos, pos + ( v * deltaTime ), false )[/code] The end pos is totally fine - it goes where I need it to. However, regardless of what I put for start pos, including straight up off-the-wall vectors that are no where close to the origin of the map, the effect will start from the origin and go to where I need it to. I've tried it with "vortigaunt_beam" as well as TF2 tracers.[/QUOTE] I'm starting to think this is a bug! It doesn't matter what the vectors are, or which tracer particle I use.
[QUOTE=Austin1346;47181923]Hello everyone, this function gets called every "think" that the player is dead. How would i only make the timer run once instead of multiple timers being created, but still have it inside the PlayerDeathThink function? Thanks! [CODE]function GM:PlayerDeathThink( ply ) timer.Simple( 5, function() ply:Spawn(); end ) end[/CODE][/QUOTE] You could just do something like this? [lua]function GM:PlayerDeathThink( ply ) if (not ply.THINK) then ply.THINK = true timer.Simple(5, function() ply:Spawn() ply.THINK = false end) end end)[/lua]
PlayerDeathThink is where respawning is handled by default. Best keep it that way for other addons (without using timers thx).
Since people really help me here, i made it finally work, YAAY \O/ But infortunely another error just happened. [LUA][ERROR] addons/strange sweps/lua/entities/ent_gra/init.lua:53: bad argument #1 to 'SetPos' (Vector expected, got function) 1. SetPos - [C]:-1 2. Boom - addons/strange sweps/lua/entities/ent_gra/init.lua:53 3. unknown - addons/strange sweps/lua/entities/ent_gra/init.lua:28 Timer Failed! [Simple][@addons/strange sweps/lua/entities/ent_gra/init.lua (line 27)] [/LUA] init.lua [LUA]AddCSLuaFile() ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.Spawnable = false function ENT:Draw() if SERVER then return end self:DrawModel() end function ENT:Initialize() self:SetModel( "models/Items/grenadeAmmo.mdl" ) self:PhysicsInit( SOLID_VPHYSICS ) -- Make us work with physics, self:SetMoveType( MOVETYPE_VPHYSICS ) -- after all, gmod is a physics self:SetSolid( SOLID_VPHYSICS ) -- Toolbox local phys = self:GetPhysicsObject() if (phys:IsValid()) then phys:Wake() timer.Simple(1, function() self:Boom() end) end end function ENT:Use( activator, caller ) return end function ENT:Think() end function ENT:Boom() local explo = ents.Create ("env_explosion") explo:SetPos(self.GetPos) explo:SetKeyValue( "iMagnitude", "220" ) explo:Spawn() end [/LUA]
You need to call GetPos. self:GetPos()
-snip-
[QUOTE=Willox;47184390]You need to call GetPos. self:GetPos()[/QUOTE] Ow man. It is always these . and : that make shit broke...
[url]http://lua-users.org/wiki/ColonForMethodCall[/url]
I'm using [URL="http://wiki.garrysmod.com/page/ENTITY/SetupDataTables"]ENTITY:SetupDataTables()[/URL] to give my SENT a networked string called "State". This "State" string is later used by each client to determine how to draw the SENT (for example, color). When using SetupDataTables(), two functions are created for each networked variable: ENT:Set___('value') and ENT:Get___(). My problem is, that the State variable (or any other networked variable for that matter) is only transmitted to the clients whenever the ENT:SetState("newvalue") function runs serverside. [B]When new players join the server, they are not drawing the SENT properly, because they don't know what value the 'State' string has.[/B] How can I solve this? E: I was silly. I set the default states on the actual SetupDataTables function rather than on SERVER initialize, which by (at least my) intuition shouldn't fix anything, but it does.
Clients probably call Initialize after having received the current values. If you really want to set the default values in Initialize it should be safe to do it serverside only.
So, my problem is, i need an entitie to be launched from another entitie in it forward angle. I searched wiki a little and i found the angle.forward(). I tryed to use it in my code just like this: [CODE] function ENT:Use( activator, caller ) local mortar = ents.Create("ent_gra") mortar:SetPos(self:GetPos() + (self:GetPos() * 16 )) mortar:SetAngles(self.Forward()) return end[/CODE] And it gives me this: [CODE] [ERROR] addons/strange sweps/lua/entities/ent_test/init.lua:42: attempt to call field 'Forward' (a nil value) 1. unknown - addons/strange sweps/lua/entities/ent_test/init.lua:42 [/CODE]
[QUOTE=Acecool;47183633]I helped him a while ago on Steam; here's the solution for those interested: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_systems/simple_delay_respawn_system/sv_delay_respawn_system.lua.html[/url][/QUOTE] [QUOTE=Author.;47184133]Just use the PlayerDeath hook? But if that's not a solution for you, then you could just do something like this; [lua]local THINK = false function GM:PlayerDeathThink( ply ) if (not THINK) then THINK = true timer.Simple(5, function() ply:Spawn() THINK = false end) end end)[/lua][/QUOTE] What about multiple players? With the code the OP posted on this issue, I explained why not to use a timer or global vars over Steam.. Basically when using a global to set DeathTime then using DeathTime in PlayerDeathThink with a respawn time of 5 seconds, it is possible based on the number of players as n to be forced to wait n * 5 seconds if players die consecutively near the 5 second respawn mark.. Using ply.DeathTime allows it to prevent respawn for specific players and allows each player to be respawned after a set time without any undesired consequences. By using a timer, and a global, depending on how PlayerDeathThink functions when you override.. you're essentially creating the same problem except instead of only having the "chance" of players dying consecutively for n * 5 seconds waiting time... you're forcing them to wait in an unordered queue with players respawning every 5 seconds, because ply may be the first, or last dead player, when the timer fires and then the PlayerDeathThink fires for a particular player... If the behavior is required for players to spawn 1 at a time, every 5 seconds, there would be a better way such as using a first-in first-out queue, and in this case a LastSpawnedTime variable could be global or part of the structure to keep track... Hopefully this clears it up... And, here's the solution again: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_systems/simple_delay_respawn_system/sv_delay_respawn_system.lua.html[/url] [editline]21st February 2015[/editline] [QUOTE=Garr;47184784]So, my problem is, i need an entitie to be launched from another entitie in it forward angle. I searched wiki a little and i found the angle.forward(). I tryed to use it in my code just like this: [CODE] function ENT:Use( activator, caller ) local mortar = ents.Create("ent_gra") mortar:SetPos(self:GetPos() + (self:GetPos() * 16 )) mortar:SetAngles(self.Forward()) return end[/CODE] And it gives me this: [CODE] [ERROR] addons/strange sweps/lua/entities/ent_test/init.lua:42: attempt to call field 'Forward' (a nil value) 1. unknown - addons/strange sweps/lua/entities/ent_test/init.lua:42 [/CODE][/QUOTE] You would need to grab self:GetAngles( ):Forward( ) which creates a normalized vector ( describes a direction but has 1 unit-length so it can be multiplied by x to produce a position x units along the direction the normalized vector describes )... You can AddVelocity using the Forward Vector multiplied by speed or force...
Does anyone know if there is an addon to show a 'projector', sort of like a cinema but you can insert any URL? I used to have it on a previous server but forgot what the addon was called.. I know there is an addon called Theater system but this only allows you to input YouTube URLs.
[QUOTE=Acecool;47184797]What about multiple players? With the code the OP posted on this issue, I explained why not to use a timer or global vars over Steam.. Basically when using a global to set DeathTime then using DeathTime in PlayerDeathThink with a respawn time of 5 seconds, it is possible based on the number of players as n to be forced to wait n * 5 seconds if players die consecutively near the 5 second respawn mark.. Using ply.DeathTime allows it to prevent respawn for specific players and allows each player to be respawned after a set time without any undesired consequences. By using a timer, and a global, depending on how PlayerDeathThink functions when you override.. you're essentially creating the same problem except instead of only having the "chance" of players dying consecutively for n * 5 seconds waiting time... you're forcing them to wait in an unordered queue with players respawning every 5 seconds, because ply may be the first, or last dead player, when the timer fires and then the PlayerDeathThink fires for a particular player... If the behavior is required for players to spawn 1 at a time, every 5 seconds, there would be a better way such as using a first-in first-out queue, and in this case a LastSpawnedTime variable could be global or part of the structure to keep track... Hopefully this clears it up... And, here's the solution again: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_systems/simple_delay_respawn_system/sv_delay_respawn_system.lua.html[/url] [editline]21st February 2015[/editline] You would need to grab self:GetAngles( ):Forward( ) which creates a normalized vector ( describes a direction but has 1 unit-length so it can be multiplied by x to produce a position x units along the direction the normalized vector describes )... You can AddVelocity using the Forward Vector multiplied by speed or force...[/QUOTE] now i get this: [CODE][ERROR] addons/strange sweps/lua/entities/ent_test/init.lua:66: bad argument #1 to 'SetAngles' (Angle expected, got userdata) 1. SetAngles - [C]:-1 2. Shoot - addons/strange sweps/lua/entities/ent_test/init.lua:66 3. unknown - addons/strange sweps/lua/entities/ent_test/init.lua:40 Timer Failed! [Simple][@addons/strange sweps/lua/entities/ent_test/init.lua (line 39)] [/CODE] Not so sure if it is my code or if i didn't use it correctly. Here is the code: [CODE]AddCSLuaFile() ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.Spawnable = false function ENT:Draw() if SERVER then return end self:DrawModel() end function ENT:Initialize() self:SetModel( "models/props_combine/headcrabcannister01a.mdl" ) self:PhysicsInit( SOLID_VPHYSICS ) -- Make us work with physics, self:SetMoveType( MOVETYPE_VPHYSICS ) -- after all, gmod is a physics self:SetSolid( SOLID_VPHYSICS ) -- Toolbox end function ENT:Use( activator, caller ) if working == 1 then timer.Simple(1, function() self:Shoot() working = 0 end) end return timer.Simple(5 , function() working = 1 end ) end function ENT:Think() end function ENT:Shoot() local mortar = ents.Create("ent_gra") mortar:SetPos(self:GetPos() + (self:GetForward() * 15 )) mortar:Spawn() mortar:SetAngles(self:GetAngles( ):Forward( )) local impulse = mortar:GetPhysicsObject() local velocity = self:GetForward() velocity = velocity * 100 velocity = velocity + (VectorRand() * 15) impulse:ApplyForceCenter( velocity ) end[/CODE] [editline]21st February 2015[/editline] [QUOTE=GmodLUA;47184885]Does anyone know if there is an addon to show a 'projector', sort of like a cinema but you can insert any URL? I used to have it on a previous server but forgot what the addon was called.. I know there is an addon called Theater system but this only allows you to input YouTube URLs.[/QUOTE] I think you are in the wrong section. But i think that the Theater System and PlayX are the only, unfortunely they only work with youtube.
I'd recommend tabbing the code so f in function and e in end line up with each other to make the code easier to read. In my post I mentioned that self:GetAngles( ):Forward( ) returns a Vector when SetAngles requires an Angle... You wouldn't need to change the angle, but you would want to set the velocity using the Forward direction..
[lua] hook.Add("HUDPaint", "DrawItemsGlow", function() local ply = LocalPlayer() local ent = ply:GetEyeTrace().Entity if(ply:GetEyeTrace()) and ent:GetClass() == "item" and ent:GetPos():Distance(ply:GetPos()) < 275 and (ply:Alive()) then surface.SetFont("ChatFont") surface.SetTextColor(231, 76, 60) surface.SetTextPos(ply:GetEyeTrace().HitPos:ToScreen().x-15,ply:GetEyeTrace().HitPos:ToScreen().y) surface.DrawText("Item") end end) [/lua] So i'd do this to draw "Item" above an item. How would I do so when the player stops looking it doesnt just disappear, and make it like fade out?
Üntested, but something like this should work; [lua]local alpha = 255 local speed = 200 hook.Add("HUDPaint", "DrawItemsGlow", function() local ply = LocalPlayer() local ent = ply:GetEyeTrace().Entity if(ply:GetEyeTrace()) and ent:GetClass() == "item" and ent:GetPos():Distance(ply:GetPos()) < 275 and (ply:Alive()) then if (alpha > 255) then alpha = math.Approach( alpha, 255, speed * FrameTime() ) end surface.SetFont("ChatFont") surface.SetTextColor(231, 76, 60, alpha) surface.SetTextPos(ply:GetEyeTrace().HitPos:ToScreen().x-15,ply:GetEyeTrace().HitPos:ToScreen().y) surface.DrawText("Item") elseif color.a > 0 then alpha = math.Approach( alpha, 0, speed * FrameTime() ) end end)[/lua] [editline]21st February 2015[/editline] Replace color.a with alpha, cant edit the post :<
I'm brand new to Gmod modding, so I'm sure these will be some basic questions with simple answers. I want to make my own props to be used in TTT. I'll probably make them in blender, then implement them with Hammer, based on some youtube tuts I've seen. But I know that when I first started playing things in Gmod, I needed to have a texture/model pack of CS downloaded so that I could actually play TTT without everything being checkered black and pink, and without giant flashing ERROR signs everywhere. Yet at the same time, I know that I could still play on some maps like the TTT minecraft maps, in which I never had this problem. If I make my own custom props, are people going to have to go out of their way to download the props they need to play on my map? Or won't they? Why?
[QUOTE=benchristians;47185483]I'm brand new to Gmod modding, so I'm sure these will be some basic questions with simple answers. I want to make my own props to be used in TTT. I'll probably make them in blender, then implement them with Hammer, based on some youtube tuts I've seen. But I know that when I first started playing things in Gmod, I needed to have a texture/model pack of CS downloaded so that I could actually play TTT without everything being checkered black and pink, and without giant flashing ERROR signs everywhere. Yet at the same time, I know that I could still play on some maps like the TTT minecraft maps, in which I never had this problem. If I make my own custom props, are people going to have to go out of their way to download the props they need to play on my map? Or won't they? Why?[/QUOTE] You can pack content into a map using a program called "PackRat" I think. The content is saved directly to the map and doesn't have to be downloaded.
[b]DarkRP is a cuckhold.[/b] SO. I haven't worked with DarkRP for a few months, I tried adding my old jobs to my DarkRP 2.6 gamemode Of course it's spitting out a non existant error, as usual. I tried using falco's shitty darkrpmodifications addon, this did not fix the problem. No matter WHAT I do, I'm still getting the SAAAAAME error refering to the SAAAAAME line "99" WHICH IS FINE. [ERROR] A runtime error has occurred in "gamemodes/methrp/gamemode/config/jobrelated.lua" on line 99. The best help I can give you is this: bad argument #1 to 'pairs' (table expected, got nil) Hints: - No hints, sorry. The responsibility for this error lies with (the authors of) one (or more) of these files: 1. gamemodes/methrp/gamemode/config/jobrelated.lua on line 99 2. gamemodes/methrp/gamemode/libraries/fn.lua on line 80 3. gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua on line 837 4. gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua on line 862 5. gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua on line 33 6. gamemodes/methrp/gamemode/modules/base/cl_gamemode_functions.lua on line 46 ------- End of Simplerr error ------- 1. error - [C]:-1 2. unknown - gamemodes/methrp/gamemode/libraries/simplerr.lua:463 3. customCheck - gamemodes/methrp/gamemode/libraries/fn.lua:80 4. Update - gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua:837 5. JobsTab - gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua:862 6. Call - gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua:33 7. unknown - gamemodes/methrp/gamemode/modules/base/cl_gamemode_functions.lua:46 [code] TEAM_POLICE = DarkRP.createJob("Police Officer", { color = Color(25, 25, 170, 255), model = { "models/player/nypd/male_02.mdl", "models/player/nypd/male_04.mdl", "models/player/nypd/male_05.mdl", "models/player/nypd/male_06.mdl", <------------- THIS IS LINE 99. "models/player/nypd/male_07.mdl", "models/player/nypd/male_08.mdl", "models/player/nypd/male_09.mdl", }, description = [[The protector of every citizen that lives in the city. You have the power to arrest criminals and protect innocents. Hit a player with your arrest baton to put them in jail. Bash a player with a stunstick and they may learn to obey the law. The Battering Ram can break down the door of a criminal, with a warrant for their arrest. The Battering Ram can also unfreeze frozen props (if enabled). Type /wanted <name> to alert the public to the presence of a criminal.]], weapons = {"arrest_stick", "unarrest_stick", "stunstick", "door_ram", "weaponchecker", "m9k_m92beretta"}, command = "cp", max = 4, salary = GAMEMODE.Config.normalsalary * 1.45, admin = 0, vote = true, hasLicense = true, ammo = { ["pistol"] = 60, } }) [/code] inb4 "methrp is dumb" [editline]21st February 2015[/editline] [code] [ERROR] gamemodes/methrp/gamemode/config/jobrelated.lua:849: table index is nil 1. unknown - gamemodes/methrp/gamemode/config/jobrelated.lua:849 2. include - [C]:-1 3. unknown - gamemodes/methrp/gamemode/cl_init.lua:38 [/code] Some more errors to add to this shit, this line doesn't even exist. Only goes up to ~690
[QUOTE=ProTweaker;47185859][b]DarkRP is a cuckhold.[/b] SO. I haven't worked with DarkRP for a few months, I tried adding my old jobs to my DarkRP 2.6 gamemode Of course it's spitting out a non existant error, as usual. I tried using falco's shitty darkrpmodifications addon, this did not fix the problem. No matter WHAT I do, I'm still getting the SAAAAAME error refering to the SAAAAAME line "99" WHICH IS FINE. [ERROR] A runtime error has occurred in "gamemodes/methrp/gamemode/config/jobrelated.lua" on line 99. The best help I can give you is this: bad argument #1 to 'pairs' (table expected, got nil) Hints: - No hints, sorry. The responsibility for this error lies with (the authors of) one (or more) of these files: 1. gamemodes/methrp/gamemode/config/jobrelated.lua on line 99 2. gamemodes/methrp/gamemode/libraries/fn.lua on line 80 3. gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua on line 837 4. gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua on line 862 5. gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua on line 33 6. gamemodes/methrp/gamemode/modules/base/cl_gamemode_functions.lua on line 46 ------- End of Simplerr error ------- 1. error - [C]:-1 2. unknown - gamemodes/methrp/gamemode/libraries/simplerr.lua:463 3. customCheck - gamemodes/methrp/gamemode/libraries/fn.lua:80 4. Update - gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua:837 5. JobsTab - gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua:862 6. Call - gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua:33 7. unknown - gamemodes/methrp/gamemode/modules/base/cl_gamemode_functions.lua:46 [code] TEAM_POLICE = DarkRP.createJob("Police Officer", { color = Color(25, 25, 170, 255), model = { "models/player/nypd/male_02.mdl", "models/player/nypd/male_04.mdl", "models/player/nypd/male_05.mdl", "models/player/nypd/male_06.mdl", <------------- THIS IS LINE 99. "models/player/nypd/male_07.mdl", "models/player/nypd/male_08.mdl", "models/player/nypd/male_09.mdl", }, description = [[The protector of every citizen that lives in the city. You have the power to arrest criminals and protect innocents. Hit a player with your arrest baton to put them in jail. Bash a player with a stunstick and they may learn to obey the law. The Battering Ram can break down the door of a criminal, with a warrant for their arrest. The Battering Ram can also unfreeze frozen props (if enabled). Type /wanted <name> to alert the public to the presence of a criminal.]], weapons = {"arrest_stick", "unarrest_stick", "stunstick", "door_ram", "weaponchecker", "m9k_m92beretta"}, command = "cp", max = 4, salary = GAMEMODE.Config.normalsalary * 1.45, admin = 0, vote = true, hasLicense = true, ammo = { ["pistol"] = 60, } }) [/code] inb4 "methrp is dumb" [editline]21st February 2015[/editline] [code] [ERROR] gamemodes/methrp/gamemode/config/jobrelated.lua:849: table index is nil 1. unknown - gamemodes/methrp/gamemode/config/jobrelated.lua:849 2. include - [C]:-1 3. unknown - gamemodes/methrp/gamemode/cl_init.lua:38 [/code] Some more errors to add to this shit, this line doesn't even exist. Only goes up to ~690[/QUOTE] If you want your line numbers to be correct you'll have to remove all comments that begin and end with "/*" and "*/".
[code] [ERROR] A runtime error has occurred in "lua/darkrp_customthings/jobs.lua" on line -1. The best help I can give you is this: GAMEMODE.DefaultTeam is not set to an existing job. Hints: - This may happen when you disable the default citizen job. Make sure you update GAMEMODE.DefaultTeam to the new default team. - GAMEMODE.DefaultTeam may be set to a job that does not exist anymore. Did you remove the job you had set to default? - The error being in jobs.lua is a guess. This is usually right, but the problem might lie somewhere else. The responsibility for this error lies with (the authors of) one (or more) of these files: jobs.lua, settings.lua, disabled_defaults.lua or any of your other custom files. ------- End of Simplerr error ------- There is 1 Lua problem! Please check your console for more information! [ERROR] A runtime error has occurred in "gamemodes/methrp/gamemode/config/jobrelated.lua" on line 99. The best help I can give you is this: bad argument #1 to 'pairs' (table expected, got nil) Hints: - No hints, sorry. The responsibility for this error lies with (the authors of) one (or more) of these files: 1. gamemodes/methrp/gamemode/config/jobrelated.lua on line 99 2. gamemodes/methrp/gamemode/libraries/fn.lua on line 80 3. gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua on line 837 4. gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua on line 862 5. gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua on line 33 6. gamemodes/methrp/gamemode/modules/base/cl_gamemode_functions.lua on line 46 ------- End of Simplerr error ------- 1. error - [C]:-1 2. unknown - gamemodes/methrp/gamemode/libraries/simplerr.lua:463 3. customCheck - gamemodes/methrp/gamemode/libraries/fn.lua:80 4. Update - gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua:837 5. JobsTab - gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua:862 6. Call - gamemodes/methrp/gamemode/modules/f4menu/cl_frame.lua:33 7. unknown - gamemodes/methrp/gamemode/modules/base/cl_gamemode_functions.lua:46 [/code] Removed all /* */ Still fucked. Code: [url]http://pastebin.com/R3WFQVu8[/url] [editline]21st February 2015[/editline] now it's giving me errors for files that don't exist 10/10 -IGN
Sorry, you need to Log In to post a reply to this thread.