Page 1 of 1

ACS_Executewithresult is failing?

Posted: Tue Dec 01, 2015 1:55 am
by Samuzero15tlh
._. weird...

All right here is my problem, in rare moments, the ACS_Executewithresult does'nt work for some reason or gives me a wrong answer. Any Ideas?

Code: Select all

//...
	Cast_Cure:
	TNT1 A 1 A_Jumpif(ACS_ExecuteWithResult(700,3) == 0,"NoMana")
	TNT1 A 0 A_Jumpif(ACS_ExecuteWithResult(720,1,1,1) == 0,"NoLevelSpr")
//...

Code: Select all

//Arg 1: Level Function 
//(1 = Check the required level to cast)
//(2 = Give Experience)
//Arg 2: Needed Level
//Arg 3: Level-Experience type
//(0 = Inteligence)
//(1 = Spirit)

Script 720 (Int Fun, Int NeedLV, Int LvXpType)
{
Int Cast;
Int ActualExp = CheckInventory(XpTypes[LvXpType]);
Int LVInt = Checkinventory(LvTypes[LvXpType]);

If (Fun == 1)
{
if(LVInt < NeedLV)
 {
 Cast = 0;
 //Print(d:Cast);
 SetResultValue(Cast);
 }
if(LVInt > NeedLV || LVInt == NeedLV)
 {
 Cast = 1;
 //Print(d:Cast);
 SetResultValue(Cast);
 }
}
I got the decorate code overloaded with all of the codes, so I dont want to share all of my source for spoil avoid reasons.

RE: ACS_Executewithresult is failing?

Posted: Tue Dec 01, 2015 3:35 pm
by FascistCat
If you are calling CLIENTSIDE scripts thru DECORATE when in a net game, those will return weird results. Scripts that execute in the server however, work fine.

http://zandronum.com/tracker/view.php?id=2367

RE: ACS_Executewithresult is failing?

Posted: Thu Dec 03, 2015 10:01 pm
by Catastrophe
Does it work correctly in singleplayer? Because ACS_ExecuteWithResult is known to desync online. Unfortunately there is no solid fix besides stalling the actor.