小弟的 383 行指的是最下面倒數第四行的 else 那一行... 我想應該不是這行錯誤,不過小弟還是將前面幾行的程式碼一起貼出來,請大大指教一下
代碼: 選擇全部
$totalcount--;
$rpg_gamble_result .= '<tr><td class="row3" colspan="7"><span class="gensmall">投注金額: ' . ($totalcount * TICKET_COST) . '<br />中獎獎金: ' . $user_jackpot .
'<br />獎金分佈: 三星 ' . $star3 . ' 注 四星 ' . $star4 . ' 注 五星 ' . $star5 . ' 注 頭彩 ' . $star6 . ' 注<br /><b>';
if ($user_jackpot >= $totalcount * TICKET_COST)
{
$rpg_gamble_result .= '恭禧您!!本次投注贏了 ' . ($user_jackpot - $totalcount * TICKET_COST);
}
else
{
$rpg_gamble_result .= '真可憐!!本次投注槓了 ' . ($totalcount * TICKET_COST - $user_jackpot);
}
$rpg_gamble_result .= ' 元</b></span></td></tr></table>';
$sql = "UPDATE " . CONFIG_TABLE . " SET config_value = config_value + " . ($totalcount * TICKET_COST) . " - " . $user_jackpot . " WHERE config_name = 'rpg_jackpot'";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "無法更新頭彩獎金!!", "", __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . CONFIG_TABLE . " SET config_value = " . SUPER_JACKPOT . " WHERE config_name = 'rpg_jackpot' and config_value < " . SUPER_JACKPOT;
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "無法更新頭彩初始獎金!!", "", __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . USERS_TABLE . " SET user_money = user_money - " . ($totalcount * TICKET_COST) . " + " . $user_jackpot . " WHERE user_id = " . intval($userdata['user_id']);
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "無法更新會員的金幣!!", "", __LINE__, __FILE__, $sql);
}
$profiledata = get_userdata(intval($userdata['user_id']));
$sql = 'SELECT * FROM phpbb_config where config_name = "rpg_jackpot"';
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, '無法取得頭彩彩金!!', '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) )
{
$board_config['rpg_jackpot'] = $row['config_value'];
}
}
else
{
$rpg_gamble_result = "請選擇 6 個號碼以上";
}
}
瀏覽竹貓的老手,架設論壇的新手.... @@"