2015-11-01 96 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”(高值)等数字。