Aller au contenu

Photo

Variable defined without type


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Vortaka

Vortaka
  • Members
  • 23 messages
Hi all, first, my situation!

I'm totally new to DAO scripting, I modded a thing or two, followed a tutorial, but I need more!!!
I'm currently trying for fun to create super spells...

Step #1, see if it's possible to mod spells (Done; scripting all the way!)
Step #2, Mod all the spells that needs to be modded!
Step #3, add new spells instead of modding the old ones.

My problem is on step 2 (not at step 3 yet).  The first spell I modded was Earthquake.  The Super Spell versions of most of my spells will identify if the target is friend or foe.  So, I only added a "if" sequence; if (IsObjectHostile(oCreator, oTarget) == FALSE).  So, if it's NOT hostile, don't harm!  (I simply use a break; ).  Now the script works fine for EarthQuake (or Super Earthquake) but as soon as I use spells in another script (spell_cone for exemple), it gives me "variable defined without type" and does not compile.

I can still use the if (IsPartyMember(oTarget) == TRUE) but I want my Super Spells just to hurt hostile people...  Not neutral not good!  Super spells!

Can anyone help?  Can anyone tell me why it works on one but not the other (I imagine that it's "called" somewhere).  Any help would be appreciated!

Thanks!


Edited:
Well, I've tried with fireball, cone of cold, earthquake, etc...  And it seems to work just fine (for the party members!)  Yippi!  :P

Modifié par Vortaka, 06 décembre 2009 - 12:56 .


#2
sillyrobot

sillyrobot
  • Members
  • 171 messages
It sounds like the compiler is not recognising the function. Verify that the script file is including any necessary header files.

#3
Vortaka

Vortaka
  • Members
  • 23 messages
Well, the thing is, I don't really know which file is needed and everything... Well, I'll stick with party members for now! Thanks...

#4
FalloutBoy

FalloutBoy
  • Members
  • 580 messages
The compiler doesn't recognize one or more of the following things: oCreator, oTarget, or IsObjectHostile. Make sure oCreator and oTarget are both declared correctly (compare with the script that works). Then check if the working script includes different things than the broken script (includes are at the top of the file).



Or just set the game to easy, so that friendly fire is off. :)




#5
Craig Graff

Craig Graff
  • Members
  • 608 messages
Nevermind - that wasn't your problem.

Modifié par Craig Graff, 08 décembre 2009 - 08:04 .