Ka3ax Posted February 19, 2013 Share Posted February 19, 2013 (edited) Hello I just try to get a bot in to a variabel because I like to contoll the bot in the futher. So I try this in this way: local slothbot = exports.slothbot local bot1 = slothbot:spawnBot(x, y+6, z, rot, skin, interior, dimension, team, weapon, mode, modesubject) outputChatBox("bot1: ".. slothbot:getBotMode(bot1)) The Bot is spawning, but I see nothing in the chat box. The console says this: [21:15:37] ERROR: ressource_test/server.lua:16: attempt to concatenate a nil value (line 16, is line 4 in this case. The out put) what is the Problem? What I do wrong? Edited February 19, 2013 by Guest Link to comment
Sparrow Posted February 19, 2013 Share Posted February 19, 2013 try: local slothbot = exports.slothbot bot1 = slothbot:spawnBot(x, y+6, z, rot, skin, interior, dimension, team, weapon, mode, modesubject) outputChatBox("bot1: ".. slothbot:getBotMode(bot1), root, 255, 0, 0) Link to comment
Ka3ax Posted February 19, 2013 Author Share Posted February 19, 2013 sorry, the same story: concatenate a nil value. May the error is in the line 2? its is right how I write the bot in the var? I'm new at LUA Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now