MantisBT - Zandronum
View Issue Details
0002367Zandronum[All Projects] Bugpublic2015-08-03 04:532016-03-30 03:14
FascistCat 
Dusk 
normalminoralways
acknowledgedopen 
MicrosoftWindowsXP/Vista/7
2.1 
 
0002367: Using ACS_ExecuteWithResult in DECORATE always return 0 in a netgame
When using the function inside a CustomInventory actor, the return value set by the script (which is different from zero) is returned correctly in single player mode. However, when using the scripts in a net game, the returned value is always zero, no matter what value is set.

Tested in Zand v2.1.2.
Write a line in DECORATE calling ACS_ExecuteWithResult. Use the result in a A_JumpIf and compare the result to an arbitrary value non equal to zero. Value returned by script will always be zero when in a netgame.
Attached ACS + DECORATE demonstrating the effect.
No tags attached.
? testExecuteWithResult.pk3 (1,208) 2015-08-03 04:53
/tracker/file_download.php?file_id=1593&type=bug
Issue History
2015-08-03 04:53FascistCatNew Issue
2015-08-03 04:53FascistCatFile Added: testExecuteWithResult.pk3
2015-11-15 19:32hjalgNote Added: 0013812
2015-11-18 01:15DuskNote Added: 0013841
2015-11-18 16:17MonsterovichNote Added: 0013842
2015-11-18 16:20MonsterovichNote Deleted: 0013842
2015-11-18 17:43BorgNote Added: 0013843
2015-11-18 17:43BorgNote Edited: 0013843bug_revision_view_page.php?bugnote_id=13843#r8244
2015-11-18 18:20MonsterovichNote Added: 0013844
2015-11-18 22:01BorgNote Added: 0013850
2015-11-24 12:53DuskNote Added: 0013877
2015-11-24 12:53DuskAssigned To => Dusk
2015-11-24 12:53DuskStatusnew => acknowledged
2016-03-30 01:53S_Andrew_SNote Added: 0014617
2016-03-30 02:48S_Andrew_SNote Edited: 0014617bug_revision_view_page.php?rev_id=8856
2016-03-30 02:50S_Andrew_SNote View State: 0014617: private
2016-03-30 02:50S_Andrew_SNote Edited: 0014617bug_revision_view_page.php?rev_id=8857
2016-03-30 03:14S_Andrew_SNote Edited: 0014617bug_revision_view_page.php?rev_id=8858
2016-03-30 03:14S_Andrew_SNote Deleted: 0014617

Notes
(0013812)
hjalg   
2015-11-15 19:32   
I agree. Theres something wrong with ACS_ExecuteWithResult and A_JumpIf in a netgame. Somehow this function executes twice in my DECORATE. First execute returns 0, second returns correct value.
(0013841)
Dusk   
2015-11-18 01:15   
Unfortunately Zandronum currently does not handle this kind of combining of A_JumpIf and ACS_ExecuteWithResult at all. The server and the client both call such ACS no matter if it's a clientside script or not currently and we cannot really change it one way or another. So I'm afraid all I can do is say "don't do that".
(0013843)
Borg   
2015-11-18 17:43   
Thats very interesting...
I have many decorate actors with ACS_ExecuteWithResult and they all work perfectly. They arent CustomInventory tho, mostly Weapon and Player class.. sometimes plain actor.. like this:

actor YAllmap replaces Allmap
{
states
  {
  Spawn:
    TNT1 A 10
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(820,1)==1,2)
    TNT1 A 1 A_SpawnItem("MAllmap")
    stop
    TNT1 A 1 A_SpawnItem("MUltraSphere")
    stop
  }
}

(0013844)
Monsterovich   
2015-11-18 18:20   
>I have many decorate actors with ACS_ExecuteWithResult and they all work perfectly.

May be because you have serverside scripts?
(0013850)
Borg   
2015-11-18 22:01   
I just downloaded the example and noticed the CLIENTSIDE.. Ugh..
Yeah, all of them are server side indeed.. Sorry for trouble.
(0013877)
Dusk   
2015-11-24 12:53   
This will certainly have to be addressed some way or another. Let's hope it doesn't break too many mods, though we can compatflag those if necessary.