MisterQuestions Posted August 22, 2014 Share Posted August 22, 2014 (edited) Hi i got an error from the script and says 'unexpected symbol near ';' Code: mysqlconnect = {user=; connect=; password=; database=;} dbConnectTable = { connect = false, user = "user", password = "", ip = "thehost", table = "table", } whats wrong?? Edited August 22, 2014 by Guest Link to comment
./BlackBird# Posted August 22, 2014 Share Posted August 22, 2014 mysqlconnect = {user="", connect="", password="", database=""} dbConnectTable = { connect = false, user = "user", password = "", ip = "thehost", table = "table", } Link to comment
MisterQuestions Posted August 22, 2014 Author Share Posted August 22, 2014 Now say's Unexpected symbol near ',' Link to comment
./BlackBird# Posted August 22, 2014 Share Posted August 22, 2014 try it again, i edited it Link to comment
MisterQuestions Posted August 22, 2014 Author Share Posted August 22, 2014 Mmm work's ! no errors now, but what was the error? Link to comment
./BlackBird# Posted August 22, 2014 Share Posted August 22, 2014 you haven't defined user, connect, password, database in table Link to comment
MisterQuestions Posted August 22, 2014 Author Share Posted August 22, 2014 I got a new error..... And say's attempt to index global 'infoDatabase' (a nil value) lua:15: function onResourceInfoStart() dbConnectTable.connect = dbConnect("mysql","dbname="..dbConnectTable.table..";host="..dbConnectTable.ip, dbConnectTable.user, dbConnectTable.password) if dbConnectTable.connect then checkMySQLTable(dbConnectTable.connect,infoDatabase.tableName,infoDatabase.tableStructure) commandSystemMySQLInit() likeSystemDatabaseInit() end end Link to comment
#DRAGON!FIRE Posted August 22, 2014 Share Posted August 22, 2014 u defineded the infoDatabase table ? Link to comment
MisterQuestions Posted August 22, 2014 Author Share Posted August 22, 2014 its by a separated resource and this is the table... local infoDatabase = { tableName = "TC_Map_info", tableStructure = { {"mapName","TEXT DEFAULT '' NOT NULL"}, {"author","TEXT DEFAULT '' NOT NULL"}, {"created","TEXT DEFAULT '' NOT NULL"}, {"lastTimePlayed","INT(6) DEFAULT 0 NOT NULL"}, {"playedCount","INT(6) DEFAULT 0 NOT NULL"}, {"toptimes","INT(6) DEFAULT 0 NOT NULL"}, {"hunters","INT(6) DEFAULT 0 NOT NULL"}, {"kills","INT(6) DEFAULT 0 NOT NULL"}, {"assists","INT(6) DEFAULT 0 NOT NULL"}, } } Link to comment
xXMADEXx Posted August 22, 2014 Share Posted August 22, 2014 Can you please post the following functions: checkMySQLTable commandSystemMySQLInit likeSystemDatabaseInit Thanks. Link to comment
#DRAGON!FIRE Posted August 22, 2014 Share Posted August 22, 2014 put the table in this resource .. and u don't have to use table to get the table name .. u can put it in your code without call table to get table name 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