DaMaster0
Member
Here's the function I have:
and this main:
and it just output this:
> mylib
(repeat this next part 50,000 times)The trophy is ready for pickup.(stop repeating)
it worked
and I do have a trophy:
does anyone know what i'm doing wrong?
Code:
string[int] can_buy_trophies()
{
string[int] map_of_trophies;
string[int] we_have;
int we_on = 0;
int i = 0;
string trophies = visit_url("trophy.php");
if (!file_to_map("Trophy.txt", map_of_trophies))
{
abort("There was a problem loading the trophies.");
}
while (i < count(map_of_trophies))
{
if (contains_text(trophies, map_of_trophies[i]))
{
print("The trophy "+map_of_trophies[i]+" is ready for pickup.", "green");
we_have[we_on] = map_of_trophies[i];
we_on = we_on + 1;
}
i = i + 1;
}
return we_have;
}
and this main:
Code:
void main()
{
string[int] pies = can_buy_trophies();
foreach i in pies
print(pies[i]);
}
and it just output this:
> mylib
(repeat this next part 50,000 times)The trophy is ready for pickup.(stop repeating)
it worked
and I do have a trophy:

does anyone know what i'm doing wrong?