Hey,
I own a DarkRP server, and I've been adding things and everything has gone along smoothly, until I tried to add my own money printers.
I am using darkrpmodification to add the printers, and editing the addentities.lua in /gamemodes/DarkRP/gamemode/config/.
I join the server and there aren't any lua/script errors at first, so then I try to spawn the printers and the game kicks me for "too many lua errors".
Here is the code that I've put into the addentities.lua
[IMG]http://i.imgur.com/A4vi7cd.png[/IMG]
What am I doing wrong?
Edit: This is the error that comes up in the console.
[ERROR] gamemodes/darkrp/entities/entities/gold_money_printer/cl_init.lua:19: bad argument #1 to 'getPhrase' (string expected, got nil)
1. getPhrase - [C]:-1
2. unknown - gamemodes/darkrp/entities/entities/gold_money_printer/cl_init.lua:19
List the Lua error.
[ERROR] gamemodes/darkrp/entities/entities/gold_money_printer/cl_init.lua:19: bad argument #1 to 'getPhrase' (string expected, got nil)
1. getPhrase - [C]:-1
2. unknown - gamemodes/darkrp/entities/entities/gold_money_printer/cl_init.lua:19
Also if you don't want to be kicked from your server from Lua errors add "sv_kickerrornum 0" to server.cfg.
[editline]22nd January 2014[/editline]
[QUOTE=ScorpiOps;43624705][ERROR] gamemodes/darkrp/entities/entities/gold_money_printer/cl_init.lua:19: bad argument #1 to 'getPhrase' (string expected, got nil)
1. getPhrase - [C]:-1
2. unknown - gamemodes/darkrp/entities/entities/gold_money_printer/cl_init.lua:19[/QUOTE]
Also it's your Gold Printer not Iron.
Put sv_kickerrornum 0 in your server.cfg to start out with. Then, are you sure that the ent is called "iron_money_printer?"
edit: holy ninja batman
I know that it is the gold, the code is the same as the iron in addentities.lua
Here is the code in gamemodes/darkrp/entities/entities/gold_money_printer/cl_init.lua
[IMG]http://i.imgur.com/Uoxhdgp.png[/IMG]
The function "DarkRP.getPhrase()" Is taking the string and finds it in the language file for translation, like a sentence or something.
Are you sure, you need to use this in this situation, have you even listed your string in the language file?
Take a look here: [url]http://wiki.darkrp.com/index.php/Functions/darkrp/shared/getphrase[/url]
And the problem is that you use the function in the wrong way, its not a string that's inside the function.
Sorry, you need to Log In to post a reply to this thread.