krommetje Super User
Joined: December 29 2004 Location: Netherlands
Online Status: Offline Posts: 695
|
Posted: January 18 2015 at 05:15 | IP Logged
|
|
|
Hi all,
I have cumulus still up and running and use realtime.txt to import weatherdata from my own weatherstation. (see http://www.power-home.com/forum/forum_posts.asp?TID=3428&PN= 1)
Now the 49th data item in realtime contains a numeric code which corresponds with a forcast and these 26 fortecasts I have put in 26 globals. Forecast1 through 26.
The global FORECAST contains the numeric code.
I want to subistute the numeric code in a webpage but for some reason my code does not work
Code:
<%if(ph_getglobal_n("FORECAST")=26, ph_getglobal_n("FORECAST26"),if(ph_getglobal_n("FORECAST")=2 5, ph_getglobal_n("FORECAST25"),if(ph_getglobal_n("FORECAST")=2 4, ph_getglobal_n("FORECAST24"),if(ph_getglobal_n("FORECAST")=2 3, ph_getglobal_n("FORECAST23"),if(ph_getglobal_n("FORECAST")=2 2, ph_getglobal_n("FORECAST22"),if(ph_getglobal_n("FORECAST")=2 1, ph_getglobal_n("FORECAST21"),if(ph_getglobal_n("FORECAST")=2 0, ph_getglobal_n("FORECAST20"),if(ph_getglobal_n("FORECAST")=1 9, ph_getglobal_n("FORECAST19"),if(ph_getglobal_n("FORECAST")=1 8, ph_getglobal_n("FORECAST18"),if(ph_getglobal_n("FORECAST")=1 7, ph_getglobal_n("FORECAST17"),if(ph_getglobal_n("FORECAST")=1 6, ph_getglobal_n("FORECAST16"),if(ph_getglobal_n("FORECAST")=1 5, ph_getglobal_n("FORECAST15"),if(ph_getglobal_n("FORECAST")=1 4, ph_getglobal_n("FORECAST14"),if(ph_getglobal_n("FORECAST")=1 3, ph_getglobal_n("FORECAST13"),if(ph_getglobal_n("FORECAST")=1 2, ph_getglobal_n("FORECAST12"),if(ph_getglobal_n("FORECAST")=1 1, ph_getglobal_n("FORECAST11"),if(ph_getglobal_n("FORECAST")=1 0, ph_getglobal_n("FORECAST10"),if(ph_getglobal_n("FORECAST")=9 , ph_getglobal_n("FORECAST9"),if(ph_getglobal_n("FORECAST")=8, ph_getglobal_n("FORECAST8"),if(ph_getglobal_n("FORECAST")=7, ph_getglobal_n("FORECAST7"),if(ph_getglobal_n("FORECAST")=6, ph_getglobal_n("FORECAST6"),if(ph_getglobal_n("FORECAST")=5, ph_getglobal_n("FORECAST5"),if(ph_getglobal_n("FORECAST")=4, ph_getglobal_n("FORECAST4"),if(ph_getglobal_n("FORECAST")=3, ph_getglobal_n("FORECAST3"),if(ph_getglobal_n("FORECAST")=2, ph_getglobal_n("FORECAST2"),if(ph_getglobal_n("FORECAST")=1, ph_getglobal_n("FORECAST1"),0))))))))))))))))))))))))))%>
|
|
|
is the formula too long? What am I doing wrong here?
Edited by krommetje - January 18 2015 at 05:16
|