int numberofints = getInputIntCount();
int i = 0;
int currentint = 0;
int max = 0;
while(i < numberofints)
{
if (i == 0)
{
max = getInputInt();
currentint = max;
}
else
{
currentint = getInputInt();
difference = currentint - max;
if (difference > 0)
{
max = currentint;
}
}
i = i + 1;
}
setOutputInt(max);
Theres a syntax error somewhere but i can't find it. Its for challenge 4.
Difference isn't declared on
Difference isn't declared on line 16:
difference=current-max;
should be,
int different=current-max;
Johhny you should have it say
Johhny you should have it say whats the problem like when doing scripts. It's a lot easier to fix problems when you know whats the problem. So like when it show the challenge in Game Messages if it fails have it show errors under all the stuff. It would be a lot easier to us mostly to the newer people. When you added it to regular scripts it was so much easier, it should add it to the challenged too.
- Drizzt Do'Urden
I could have sworn I had
I could have sworn I had already, it should be posting error messages when a challenge fails... It is going to for sure.
If that script was being used
If that script was being used as a regular script it would get a error saying something like "Compile error difference not declared". Then roule would be able to fix it with no problem.
- Drizzt Do'Urden