Scriptname PKRoseLevel extends Actor GlobalVariable Property PKMoveSlotNum Auto SPELL Property Absorb Auto SPELL Property MegaDrain Auto SPELL Property Growth Auto SPELL Property StunSpore Auto SPELL Property PoisonSting Auto SPELL Property MoveSlot1 Auto SPELL Property MoveSlot2 Auto SPELL Property MoveSlot3 Auto SPELL Property MoveSlot4 Auto ;This decides what move should be learned by the pokemon based upon the current level of the ;player.Spell Function newMove() if Game.GetPlayer().GetLevel() == 4 return Growth endIf if Game.GetPlayer().GetLevel() == 7 return PoisonSting endIf if Game.GetPlayer().GetLevel() == 10 return StunSpore endIf if Game.GetPlayer().GetLevel() == 13 return MegaDrain endIfendFunction;This next code decides, based upon what dialogue choice the player has chosen (each corresponding ;to a spell slot) which has set a global variable to a value of 0-3. These comparisons are the problem.Spell Function oldMove() if PKMoveSlotNum == 0 return MoveSlot1 endIf if PKMoveSlotNum == 1 return MoveSlot2 endIf if PKMoveSlotNum == 2 return MoveSlot3 endIf if PKMoveSlotNum == 3 return MoveSlot4 endIfendFunction;This actually handles forgetting the move chosen by the player (unless it is an empty slot) and adding ;the new move. It also updates the scripts properties to have the moveslots filled correctly.Function LearnMove() if(oldMove() != None) self.RemoveSpell(oldMove()) EndIf self.AddSpell(newMove()) if PKMoveSlotNum == 0 MoveSlot1 = newMove() endIf if PKMoveSlotNum == 1 MoveSlot2 = newMove() endIf if PKMoveSlotNum == 2 MoveSlot3 = newMove() endIf if PKMoveSlotNum == 3 MoveSlot4 = newMove() endIfEndFunction
and I get this error over and over again
c:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\PKRoseLevel.psc(37,20): cannot compare a globalvariable to a int (cast missing or types unrelated)
c:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\PKRoseLevel.psc(40,20): cannot compare a globalvariable to a int (cast missing or types unrelated)
c:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\PKRoseLevel.psc(43,20): cannot compare a globalvariable to a int (cast missing or types unrelated)
c:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\PKRoseLevel.psc(46,20): cannot compare a globalvariable to a int (cast missing or types unrelated)
c:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\PKRoseLevel.psc(56,20): cannot compare a globalvariable to a int (cast missing or types unrelated)
c:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\PKRoseLevel.psc(59,20): cannot compare a globalvariable to a int (cast missing or types unrelated)
c:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\PKRoseLevel.psc(62,20): cannot compare a globalvariable to a int (cast missing or types unrelated)
c:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temelated)p\PKRoseLevel.psc(65,20): cannot compare a globalvariable to a int (cast missing or types unr
Anyone know how to change my syntax or whatever so make this do what I'm trying to do?
