2015-11-01 97 views
-2

我有一個遊戲服務器,並在錯誤溢出問題6.溢出在Visual Basic 6

調試:

If Spell(spellnum).END > 0 Then 
    TempPlayer(Index).END = GetPlayerStat(Index, Endurance) 
    SetPlayerStat Index, Endurance, GetPlayerStat(Index, Endurance) + Spell(spellnum).END 
    SendStats Index 
End If 

DEBUG強調:

TempPlayer(Index).END = GetPlayerStat(Index, Endurance) 

回答

0

什麼樣的你對回報line:

GetPlayerStat(Index,Endurance)

您可以檢查回報的類型和分配情況嗎?通常,當我遇到溢出問題時,試圖在「integer」或「single」類型的變量中輸入「long」(高值)等數字。