ACS_Executewithresult is failing?

Discuss all aspects related to modding Zandronum here.
Post Reply
Samuzero15tlh
Forum Regular
Posts: 258
Joined: Wed Sep 09, 2015 2:21 pm
Location: In home, sweet Home
Clan Tag: <skr>

ACS_Executewithresult is failing?

#1

Post by Samuzero15tlh » Tue Dec 01, 2015 1:55 am

._. 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.
Last edited by Samuzero15tlh on Tue Dec 01, 2015 1:59 am, edited 1 time in total.
Everyone wants happiness without pain, but you cant have a rainbow without a rain.

I'm working in the Shotgun Frenzy Plus mod in my free time.
Yes, I have a pet that helps me to build doom projects, the Pack-O-Daemon, ain't it cute?.

Spoiler: My Other zandro stuff! (Open)


Samuzero15tlh

FascistCat
 
Posts: 98
Joined: Mon Jul 20, 2015 12:51 pm

RE: ACS_Executewithresult is failing?

#2

Post by FascistCat » Tue Dec 01, 2015 3:35 pm

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

Catastrophe
Retired Staff / Community Team Member
Posts: 2569
Joined: Sat Jun 02, 2012 2:44 am

RE: ACS_Executewithresult is failing?

#3

Post by Catastrophe » Thu Dec 03, 2015 10:01 pm

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

Post Reply