Aller au contenu

Photo

Help with an if statement


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

#1
Surek

Surek
  • Members
  • 94 messages
if (!GetLevelByClass(CLASS_TYPE_WIZARD, oRespawner) && GetSubRace(oRespawner)!="Demonologist") && GetSubRace(oRespawner)!="Rune Caster")
   return;
effect eFail = SupernaturalEffect(EffectSpellFailure());
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eFail, oRespawner);

I was hopeing somone could help me. I have this script and I keep getting an error when I try to compile the script.

Basicly it works fine when it  checks for wizard and the first subrace but then i tryed adding the second subrace and i keep getting an error not sure what I'm doing wrong any help would be great. the error i'm getting unknown state in compiler.

 

Here is part of the script,

 

 



#2
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages

if (!GetLevelByClass(CLASS_TYPE_WIZARD, oRespawner) && GetSubRace(oRespawner)!="Demonologist") && GetSubRace(oRespawner)!="Rune Caster")
return;

 

remove the red bracket



#3
Surek

Surek
  • Members
  • 94 messages

Thank you it works now. :D