Jump to content
  • 0

Need help with DECOHack error.


Z0RGUSSY

Question

Hi everyone, I am currently working on a project (again after many of my cancelled projects) and I was using DECOHack to make some custom enemies. Currently here, I am making an enemy that would sometimes deploy a shield to block attacks and deploy it when it's pain state is activated. However, there is some errors I am unsure of how to fix. Even though I have made the shield entity, it would say it is not a "valid alias" and the comma keeps messing with it. Can anyone give me an answer if possible? Thanks. 1531553821_Screenshot(123).png.547390fcdcf926d960ce58b7e1578b9d.png1691243092_Screenshot(124).png.992ff61e3aa794f744b749740cb97a63.png

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0

I'm going to hazard a guess that thing EliteShield must exist and be defined before you can #define anything with it. I'd try putting it in a separate file and then #include it at the start after dsdhacked/friendly.

Share this post


Link to post
  • 0
40 minutes ago, Doomy__Doom said:

I'm going to hazard a guess that thing EliteShield must exist and be defined before you can #define anything with it. I'd try putting it in a separate file and then #include it at the start after dsdhacked/friendly.

I've tried it. Unfortunately, it did not work.

Share this post


Link to post
  • 0

Sorry I'm blind, of course it'd complain about incorrect alias if you don't put a comma after "elite shield" in the macro.

A minimized example that compiles for me without errors (didn't try to run it in-game, as it's obviously incomplete):

#include <dsdhacked>
#include <friendly>

#define A_EliteShield {A_MonsterProjectile(EliteShield, 1.0, 0.0, 0.0, 0.0)}

auto thing EliteShield {+MISSILE}
thing EliteShield "Elite Shield"
{
	health 1000
	speed 0
	radius 20
	height 56
	
	+SHOOTABLE
}


auto thing MyImp : thing MTF_IMP {
	States {
		Attack:
			TROO EEF 8 A_FaceTarget
			TROO G 6 A_EliteShield
			goto See
	}
}

 

Share this post


Link to post
  • 0
28 minutes ago, Doomy__Doom said:

Sorry I'm blind, of course it'd complain about incorrect alias if you don't put a comma after "elite shield" in the macro.

A minimized example that compiles for me without errors (didn't try to run it in-game, as it's obviously incomplete):


#include <dsdhacked>
#include <friendly>

#define A_EliteShield {A_MonsterProjectile(EliteShield, 1.0, 0.0, 0.0, 0.0)}

auto thing EliteShield {+MISSILE}
thing EliteShield "Elite Shield"
{
	health 1000
	speed 0
	radius 20
	height 56
	
	+SHOOTABLE
}


auto thing MyImp : thing MTF_IMP {
	States {
		Attack:
			TROO EEF 8 A_FaceTarget
			TROO G 6 A_EliteShield
			goto See
	}
}

 

So I wrote the necessary stuff from here and that error was gone until I got a warm welcome with another one. Which is this

 

"Line 35, Token "auto": Expected a positive integer for the thing slot number after "EliteShield"."

 

And ik, this may sound obvious but I am very new to DECOHack. So there is a lot of shit I still don't know.
1966808052_Screenshot(125).png.39d0e9bcf8f7ceaddd8408c2721024e0.png

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...