Skip to content

Help Whit %olympaidend%

Featured Replies

Hello, I want to ask why not working on my html this command %OlympaidEnd%, I used this in frozen its works perfect. Here command

(location npchtmlmessage)

protected static int _period;

 

public void replace(String pattern, String value)

{

long milliToEnd;

if(_period == 0)

{

milliToEnd = Olympiad.getMillisToOlympiadEnd();

}

else

{

milliToEnd = Olympiad.getMillisToValidationEnd();

}

 

double numSecs = milliToEnd / 1000 % 60;

double countDown = (milliToEnd / 1000 - numSecs) / 60;

int numMins = (int) Math.floor(countDown % 60);

countDown = (countDown - numMins) / 60;

int numHours = (int) Math.floor(countDown % 24);

int numDays = (int) Math.floor((countDown - numHours) / 24);

 

_html = _html.replaceAll("%OlympaidEnd%", "Olympiad period ends in " + numDays + " days, " + numHours + " hours, " + numMins + " minutes." );

_html = _html.replace("%online1%",  + World.getInstance().getAllPlayers().size()*2 + "");

        _html = _html.replaceAll(pattern, value);

 

}

Not working for me :(

Edited by Mellion

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.