Hallo,
ich habe ein kleines Problem mit meinem Glücksspiel-Script.
'j_lotto1' und 'j_lotto2' sind die Zahlen, die vom Glücksspiel-System zufällig ausgewählt wurden. Diese werden in der Datenbank in den Spalten 'Zahl1' und 'Zahl2' gespeichert.
'p1_lotto1' und 'p1_lotto2' sind die Zahlen, die sich der Spieler gedacht hat. Diese werden in der Datenbank in den Spalten 'Zahl1' und 'Zahl2' gespeichert.
Nun werden die Zahlen vom Spieler mit denen vom Glücksspiel-System verglichen (Zeile 14). Obwohl meine Zahlen mit denen vom Glücksspiel-System übereinstimmen (nur testweise), wird 'Test' in Zeile 19 nicht ausgegeben.
Lua
function startZiehung()
local result0 = mysql_query(sqlcon, "SELECT * FROM lotto_data WHERE Name='LottoJackpotZiehung';")
if result0 then
rows0 = mysql_num_rows(result0)
if rows0 == 1 then
row0 = mysql_fetch_assoc(result0)
end
mysql_free_result(result0)
end
if rows0 == 1 then
j_lotto1 = tonumber(row0.Zahl1)
j_lotto2 = tonumber(row0.Zahl2)
j_jackpot = tonumber(row0.Jackpot)
local result1 = mysql_query(sqlcon, "SELECT * FROM lotto_data WHERE Zahl1="..j_lotto1.." AND Zahl2="..j_lotto2.." OR Zahl1="..j_lotto2.." AND Zahl2="..j_lotto1..";")
if result1 then
rows1 = mysql_num_rows(result1)
if rows1 == 1 then
row1 = mysql_fetch_assoc(result1)
outputChatBox("Test", root)
end
mysql_free_result(result1)
end
if rows1 == 1 then
p1_name = tostring(row1.Name)
p1_lotto1 = tonumber(row1.Zahl1)
p1_lotto2 = tonumber(row1.Zahl2)
end
end
end
Alles anzeigen
VG