Fehler in der questlib.lua

06/23/2016 14:26 ichhauedich666#1
Moin moin,

habe folgendes Problem...

Für eine Quest die die Player.Player durchsuchen soll, habe ich den Befehl
mysql_query in die quest_functions und die questlib.lua eingefügt.

Nun kommt dieser Fehler in Putty

locale/germany/quest/questlib.lua:1972: `=' expected near `▒'

Hier ist der questlib Ausschnitt

(Zeile 1972 ist die "if not pre then" Zeile)

PHP Code:
mysql_query = function(query)
* * if 
not pre then
* * * * local rt io.open('CONFIG','r'):read('*all')
* * * * 
pre,_string.gsub(rt,'.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)%s(%S+).+','-h%1 -u%2 -p%3 -D%4')
* * 
end
* * math.randomseed(os.time())
* * 
local fi,t,out 'mysql_data_'..math.random(10^9)+math.random(2^4,2^10),{},{}
    -- * 
os.execute('mysql '..pre..' --e='..string.format('%q',query)..' > '..fi) -- for MySQL51
    os
.execute('mysql '..pre..' -e'..string.format('%q',query)..' > '..fi) -- for MySQL55
* * for av in io.open(fi,'r'):lines() do table.insert(t,split(av,'\t')) endos.remove(fi);
* * for 
2table.getn(t) do table.foreach(t[i],function(a,b)
* * * * 
out[i-1]* * * * * * * *= out[i-1] or {}
* * * * 
out[i-1][a]* * * * * * = tonumber(b) or or 'NULL'
* * * * out[t[1][a]]* * * *    = out[t[1][a]] or {}
* * * * 
out[t[1][a]][i-1]* * * = tonumber(b) or or 'NULL'
* * endend
* * return out
end 

Sieht jemand einen Fehler ? :D

Danke im voraus!!!
06/24/2016 05:29 Natsu Dragneel#2
Kannst du mal einen Ausschnitt aus einer Funktion vor der mysql_query hier einfügen, möchte etwas vergleichen.