2007-01-13 12:03 AM
IF pUseStory = 1 THEN
TempVar = REQUEST("Home_Story", "", StoryNumber)
StoryNumber = StoryNumber + pAdjustment
pRoomNumber = STR(StoryNumber, 1, 0) + ROOM_NUMBER
ELSE
pRoomNumber = ROOM_NUMBER
ENDIF
PARAMETERS pRoomNumber = pRoomNumber
Note that my vars beginning with 'p' are in the parameters list, and my vars without 'p' only exist in the specific script. pRoomNumber is the var I'm referencing in my schedule.2007-01-13 12:32 AM
2007-01-15 07:50 PM
F. wrote:That's fantastic!
There are a few parameters and requests, which do not work in shedule mode.
2007-01-16 08:44 AM
2007-01-17 12:16 AM
IF pUseStory = 1 THEN
LengthOfNum = STRLEN(ROOM_NUMBER)
ROOM_NUMBER = STRSUB(ROOM_NUMBER, LengthOfNum - 1, 2) [save last two digits]
TempVar = REQUEST("Home_Story", "", StoryNumber) [get current story number]
StoryNumber = StoryNumber + pAdjustment [in US you must add 1 to the internal story number]
IF StoryNumber >= 13 THEN StoryNumber = StoryNumber + 1 [for the superstitious ;-)]
pRoomNumber = STR(StoryNumber, 1, 0) + ROOM_NUMBER [create number]
ROOM_NUMBER = pRoomNumber [store to global variable]
PARAMETERS ROOM_NUMBER = ROOM_NUMBER [store to parameter]
ENDIF
Our room numbers always have 3 digits, therefore, if you are using the automatic prefix, the script must first save the last two digits of the current room number, and then add the prefix. This makes it impossible to get the wrong prefix because the script will always fix it.
2007-01-17 01:34 AM
2007-01-17 03:04 AM
F. wrote:It runs in the Master Script. I haven't tried it in the 2D script.
In which script part does it run?
F. wrote:I can get it into the schedule, but for some reason it always returned "1" as the first digit. So if I had zones "201", "202, and "203" on the second floor, the schedule always showed "101", "102", and "103". And if I had zones "301", "302", and "303" on the third floor, it still showed "101", "102", and "103" in the schedule.
Why can't you get the pRoomNumber in an AC-shedule?
2007-01-17 10:06 PM