• Need help with some LUA problems!
    7 replies, posted
[B]Hi, I'm getting this error message with my gamemode - [/B] [ERROR] gamemodes/basewars/gamemode/cl_init.lua:1062: bad argument #1 to 'pairs' (table expected, got nil) 1. pairs - [C]:-1 2. DrawDrugs - gamemodes/basewars/gamemode/cl_init.lua:1062 3. unknown - gamemodes/basewars/gamemode/cl_init.lua:819 [B][U]These are the lines that are specified in the error message: Line 819:[/U][/B] [url]http://pastebin.com/LtQn6FNJ[/url] [B][U]Line 1062 - 1076:[/U][/B] [url]http://pastebin.com/k8xgmNeX[/url] [B]Please help me as soon as possible, thanks :)[/B]
drugtable doesn't seem to exist or isn't defined correctly. Look before line 1062 for drugtable
How would I define it, there is nothing about a drugtable.
I think to declare a table you do [code] drugtable = {thing1, thing2, thing3} [/code] I don't know what goes in that table though
Where about would I put that?
Before where it's first declared, which I assume is where the error was at line 1062
Alright thanks, I'm completely new to coding and could you give an example of what would go in a table please? [editline]9th March 2014[/editline] I fixed that I'm now getting an error message saying: [ERROR] gamemodes/basewars/gamemode/cl_init.lua:822: attempt to call method 'PaintMessages' (a nil value) 1. unknown - gamemodes/basewars/gamemode/cl_init.lua:822 and line 822 is: self:PaintMessages()
I don't know what PaintMessages does but it doesn't exist, I'm not really sure how to fix that, you might just have to remove it
Sorry, you need to Log In to post a reply to this thread.