I want the mana sphere to not be used if you are full mana, which would be a nice quality of life update. Here's the code I'm trying, which compiles, but crashes the editor when I click on the sphere. Any ideas?
if(evtuse())
{
if(Player.getsp()<Player.getmaxsp())
{
if(getday()>=getstate())
{
message("You touch the sphere and feel mentally refreshed.");
player.setfullsp();
setstate(getday()+7);
}
else
message("You touch the sphere but nothing happens.");
}
if(Player.getsp()>=Player.getmaxsp())
{
message("There's no need to use this, your mana is full.")
}
}
else
default();