i figured it out thx for reading though. also wtf why cant i call chat.AddText with get field and push string it says attempt to call nill value
how do i use runstring with the new gmod 13 headers i tried using get field and call like this
LUA->GetField(-1, "print");
LUA->PushString("xxxxxxxxxxxxxxxxxx");
LUA->Call(1, 0);
but when i run it it tells me
[ERROR] attempt to index a number value
1. ExampleFunc - [C]:-1
2. unknown - lua/testbed.lua:2
btw i just copy/pasted the example code and put the above shit in the example function and tried to call it in a script and also i tried blue kirbys extended luabase but it crashes my game when i try to run a string
thx gamers
Last edited by Azrius; 09-22-2014 at 12:22 PM.
i figured it out thx for reading though. also wtf why cant i call chat.AddText with get field and push string it says attempt to call nill value
You should look at https://wiki.garrysmod.com/page/C_Lua:_Functions before posting on the forums
[IMG]https://www.danasof*****m/sig/Obama33868.jpg[/IMG]
//Solved.....
Muh Tumblr (NSFW)
Click HERE to join the Night Owls if you stay up late on MPGH
Anime Recommendation (3/14/15) | Manga/Manhwa Recommendation (8/20/15)
^ I'll update one of these soon I swear ^
Member Since 8/05/2012
Editor 4/04/13 - 4/21/13
Middleman 7/14/13 - 11/4/13
Battlefield Minion 6/13/14-3/20/15
Steam Minion 7/16/14-3/20/15
Minion+ 10/1/14-3/20/15
M.A.T. Minion 10/19/14-3/20/15
ROTMG Minion 1/14/15-3/20/15
Donator Since 2/26/15 (Thanks @Cursed!)
Steam Minion 5/9/15 - 11/5/15
OSFPS Minion 9/15/15 - 11/5/15