Jump to content

Featured Replies

Posted

I need some help with this LUA code, it's for Garry's Mod. What I'm trying to do is to make an ION Cannon. Anyway there's something wrong with my table.inserts. It says i don't have the right arguments.

 

This is what it looks like:

function TOOL.BuildCPanel( CPanel )
CPanel:AddControl( "Header", {TEXT = "ION Cannon", Description =  "#Tool_wire_IONCannon_desc"} )

local params = { Label = "#Presets", MenuButton = "1", Folder = "wire_IONCannon", Options = {}, CVars = {} }

	params.Options.default = {
			wire_IONCannon_delay	=	"1",
			wire_IONCannon_damage	=	"500",
			wire_IONCannon_sound	=	"Zap",
			wire_IONCannon_ions		=	"1",
	}

	
table.insert{params.CVars,"wire_IONCannon_delay"}
table.insert{params.CVars,"wire_IONCannon_damage"}
table.insert{params.CVars,"wire_IONCannon_sound"}
table.insert{params.CVars,"wire_IONCannon_auto"}

 

Ok, that's just a part of it, but it's the part that's fucked up. I don't know whats wrong and no one of the wiremod forum is getting back to me.

Guest
This topic is now closed to further replies.