chumchum
March 26th, 2008, 12:33 AM
Hello all
I've been trying to create a mod for GMod 10, you can see the original idea/post here (http://forum.moddb.com/thread/23950/?page=2).(only the last post is relavent, to this thread)
AS you can see the thread died an no one there can help me, so I turned to you guys =D.
Anyway, my problem is...well I don't know the problem, which is why I want to debug my code in source with dev console and have tried to do somaking a command for each of my functions that returns text to see if code is working.
I tried this at first (yeah it's all in the thread) and my commands didn't return anything(even for working code), so I wanted to know if my code for creating console commands was even working, so I wrote this script
function testfunction()
player.GetByID( 1 ):PrintMessage( HUD_PRINTCENTER, "LOLZ" )
end
concommand.Add("laugh", testfunction())
Alas, this didn't work.
Does anyone know what I got wrong and could they please tell me how to fix it.
Any help and suggestions will be appreciated :D
Oh, and you'll probably need this since any Lua scripters out there won't necesserally be familiar with GMod 10 functions ;)
http://www.garrysmod.com/wiki/?title=Server_Function_Dump
http://www.garrysmod.com/wiki/?title=Client_Function_Dump
http://www.garrysmod.com/wiki/?title=Global_Functions
I've been trying to create a mod for GMod 10, you can see the original idea/post here (http://forum.moddb.com/thread/23950/?page=2).(only the last post is relavent, to this thread)
AS you can see the thread died an no one there can help me, so I turned to you guys =D.
Anyway, my problem is...well I don't know the problem, which is why I want to debug my code in source with dev console and have tried to do somaking a command for each of my functions that returns text to see if code is working.
I tried this at first (yeah it's all in the thread) and my commands didn't return anything(even for working code), so I wanted to know if my code for creating console commands was even working, so I wrote this script
function testfunction()
player.GetByID( 1 ):PrintMessage( HUD_PRINTCENTER, "LOLZ" )
end
concommand.Add("laugh", testfunction())
Alas, this didn't work.
Does anyone know what I got wrong and could they please tell me how to fix it.
Any help and suggestions will be appreciated :D
Oh, and you'll probably need this since any Lua scripters out there won't necesserally be familiar with GMod 10 functions ;)
http://www.garrysmod.com/wiki/?title=Server_Function_Dump
http://www.garrysmod.com/wiki/?title=Client_Function_Dump
http://www.garrysmod.com/wiki/?title=Global_Functions