Malekitsu / Maw-Mod-MMMerge

Maw Mod code adapted for MMMerge
16 stars 4 forks source link

Crash when cast protection spells in multiplayer #7

Closed Sblash closed 7 months ago

Sblash commented 7 months ago

When someone casts a protection spells in multiplayer, the party (but not the caster) crashes with the following error:

...Games\Might and Magic 8\Scripts\General\zzMaw-Spells.lua:469: attempt to index a nil value

stack traceback:
    ...Games\Might and Magic 8\Scripts\General\zzMaw-Spells.lua:469: in function 'v'
    ...laxy\Games\Might and Magic 8\Scripts/Core/EventsList.lua:66: in function 'docall'
    ...laxy\Games\Might and Magic 8\Scripts/Core/EventsList.lua:126: in function 'call'
    ...\Games\Might and Magic 8\Scripts\General\ExtraEvents.lua:857: in function 'f'
    ...OG Galaxy\Games\Might and Magic 8\Scripts/Core/RSMem.lua:1992: in function <...OG Galaxy\Games\Might and Magic 8\Scripts/Core/RSMem.lua:1990>
    [C]: in function 'pcall'
    ...G Galaxy\Games\Might and Magic 8\Scripts/Core/Common.lua:203: in function 'pcall2'
    ...OG Galaxy\Games\Might and Magic 8\Scripts/Core/RSMem.lua:1779: in function <...OG Galaxy\Games\Might and Magic 8\Scripts/Core/RSMem.lua:1776>

arguments of 'v':
    t = (table: 0x22350f60)

local variables of 'v':
    (*temporary) = nil
    (*temporary) = 8
    (*temporary) = (table: 0x0458f820)
    (*temporary) = (table: 0x22350f88)
    (*temporary) = 49
    (*temporary) = (table: 0x02d759e0)
    (*temporary) = 2
    (*temporary) = 25
    (*temporary) = 5
    (*temporary) = 4
    (*temporary) = 1
    (*temporary) = (table: 0x22350f88)
    (*temporary) = "attempt to index a nil value"

upvalues of 'v':
    curseBase = (table: 0x1a50ad10)
    curseScaling = (table: 0x1a50ad60)
    lesserHealBase = (table: 0x1a50ae50)
    lesserHealScaling = (table: 0x1a50aea0)
    greaterHealBase = (table: 0x1a50aef0)
    greaterHealScaling = (table: 0x1a50af40)
    hopList = (table: 0x032a0830)
> 
Malekitsu commented 7 months ago

Hey! Thanks for reporting and thanks for the fix, will check your correction in a bit.