Jump to content

URWIGO builder


yourself

Recommended Posts

Anyone want to try to figure this out:

I am trying to get this .LUA into urwigo but it keeps having an error? Ranger fox this is your program

Post the lua file or directions where to get it and I take a look.

 

Sorry It is the whack a lackey cart (http://www.Wherigo.com/cartridge/details.aspx?CGUID=f6002f33-c68a-4966-82ca-3c392a85d892) It has some sort of script in it wont let me run it in urwigo. Any help on getting it to load in urwigo would be nice

Link to comment

Sorry It is the whack a lackey cart (http://www.Wherigo.com/cartridge/details.aspx?CGUID=f6002f33-c68a-4966-82ca-3c392a85d892) It has some sort of script in it wont let me run it in urwigo. Any help on getting it to load in urwigo would be nice

Import fails because it is a "Play Anywhere" cartridge, so it does not have a "valid" starting location. That is currently not supported, sorry.

Link to comment

Sorry It is the whack a lackey cart (http://www.Wherigo.com/cartridge/details.aspx?CGUID=f6002f33-c68a-4966-82ca-3c392a85d892) It has some sort of script in it wont let me run it in urwigo. Any help on getting it to load in urwigo would be nice

Import fails because it is a "Play Anywhere" cartridge, so it does not have a "valid" starting location. That is currently not supported, sorry.

You could edit the file and replace

cartWhackALackey.StartingLocation = Wherigo.INVALID_ZONEPOINT

with

cartWhackALackey.StartingLocation = ZonePoint(45, -80, 0)

 

For what it's worth, Earwigo can import Whack-A-Lackey.lua as-is. It ignores the call to StopGame() in zitemStartGame:OnEndGame(), but then so does the Groundspeak builder.

Link to comment

Unfortunately, that invalid ZonePoint is what defines a cartridge as Play Anywhere. If I add a valid ZonePoint, the Players and emulator will display a distance to the cartridge's starting coordinates. As this isn't a favorable outcome, I cannot edit the cartridge for Urwigo import.

 

Is there anything you can do, yourself? Perhaps if Urwigo encounters an invalid ZonePoint, it could substitute it with ZonePoint(0,0,0) and set a flag somewhere so that, when it generates a GWZ, the INVALID_ZONEPOINT object will be put back into the lua. Wait... I don't need to suggest anything since you're also a competent developer. You've already considered the problem and several solutions!

Link to comment
Unfortunately, that invalid ZonePoint is what defines a cartridge as Play Anywhere. If I add a valid ZonePoint, the Players and emulator will display a distance to the cartridge's starting coordinates. As this isn't a favorable outcome, I cannot edit the cartridge for Urwigo import.

Yes, but everyone else can. :) However, if Urwigo can't generate play-anywhere cartridges (hmmm, I thought it could?), that would seem to make importing one rather academic.

Edited by sTeamTraen
Link to comment

Hello! Perhaps this is a silly question but I'm having problems finding out how to create a Player Input where the player selects an answer from a list of options (like described here for the official builder: http://www.Wherigo.com/tutorial/advanced.aspx).

 

Well I can do most of the things... like creating the dialog box displaying the options... but then, how to compare the pressed button with the right answer and interact from there ?

 

UPDATE: Found it.

Edited by Torgut
Link to comment

Hello,

 

I'm building a cartridge for a nightcache. Does someone have a userscript so I can block the cartridge between 07.00 am and 08.00 pm (for example)???

 

I found some scripts about time but don't know how to insert it in Urwigo

 

Greetz

 

Tjappie W

Netherlands

 

FOUND IT:

I've used (a part of) the script (date/time) of me2d09 en editet a little bit and it worked (see attachment)

post-2010533-1279748822.jpg

Edited by Tjappie W
Link to comment
I'm building a cartridge for a nightcache. Does someone have a userscript so I can block the cartridge between 07.00 am and 08.00 pm (for example)???

Why so restrictive? I can go night caching at 5pm in December, but I can "cheat" and do your cartridge in perfect daylight at 9pm in June. So you probably need to do a bit more programming involving using the month as well. Or, you could lighten up on the whole "blocking" thing, unless there's a cash reward that you need to protect.

Link to comment

Hello,

 

I'm building a cartridge for a nightcache. Does someone have a userscript so I can block the cartridge between 07.00 am and 08.00 pm (for example)???

 

I found some scripts about time but don't know how to insert it in Urwigo

 

 

I would be interested in seeing how to program that too, night caches are fun.

Bill

Link to comment

Hello,

 

I'm building a cartridge for a nightcache. Does someone have a userscript so I can block the cartridge between 07.00 am and 08.00 pm (for example)???

 

I found some scripts about time but don't know how to insert it in Urwigo

 

Greetz

 

Tjappie W

Netherlands

 

FOUND IT:

I've used (a part of) the script (date/time) of me2d09 en editet a little bit and it worked (see attachment)

 

Caveat: Use GMT to do your calculations. Otherwise, people can bypass your tests by changing the time zone in the GPS.

Link to comment

Hello,

 

I'm building a cartridge for a nightcache. Does someone have a userscript so I can block the cartridge between 07.00 am and 08.00 pm (for example)???

 

I found some scripts about time but don't know how to insert it in Urwigo

 

Greetz

 

Tjappie W

Netherlands

 

FOUND IT:

I've used (a part of) the script (date/time) of me2d09 en editet a little bit and it worked (see attachment)

 

Caveat: Use GMT to do your calculations. Otherwise, people can bypass your tests by changing the time zone in the GPS.

 

This script is using the time of the GPS??? And i can't edit the time in my gps, the time is set by a gps connection.......

Link to comment

Hello,

 

I'm building a cartridge for a nightcache. Does someone have a userscript so I can block the cartridge between 07.00 am and 08.00 pm (for example)???

 

I found some scripts about time but don't know how to insert it in Urwigo

 

Greetz

 

Tjappie W

Netherlands

 

FOUND IT:

I've used (a part of) the script (date/time) of me2d09 en editet a little bit and it worked (see attachment)

 

Caveat: Use GMT to do your calculations. Otherwise, people can bypass your tests by changing the time zone in the GPS.

 

This script is using the time of the GPS??? And i can't edit the time in my gps, the time is set by a gps connection.......

Link to comment
I'm building a cartridge for a nightcache. Does someone have a userscript so I can block the cartridge between 07.00 am and 08.00 pm (for example)???

Why so restrictive? I can go night caching at 5pm in December, but I can "cheat" and do your cartridge in perfect daylight at 9pm in June. So you probably need to do a bit more programming involving using the month as well. Or, you could lighten up on the whole "blocking" thing, unless there's a cash reward that you need to protect.

 

We'll if you wanna cheat, why is there emulator en simulatorprotection in Urwigo......

 

I thougd i was a little creative.....

 

Tjappie W

Link to comment

Hello,

 

I'm building a cartridge for a nightcache. Does someone have a userscript so I can block the cartridge between 07.00 am and 08.00 pm (for example)???

 

I found some scripts about time but don't know how to insert it in Urwigo

 

Greetz

 

Tjappie W

Netherlands

 

FOUND IT:

I've used (a part of) the script (date/time) of me2d09 en editet a little bit and it worked (see attachment)

 

Caveat: Use GMT to do your calculations. Otherwise, people can bypass your tests by changing the time zone in the GPS.

 

This script is using the time of the GPS??? And i can't edit the time in my gps, the time is set by a gps connection.......

 

Lua can provide two times, current location time and GMT. If you use current location time, I can make that anything I want by telling the GPS I am in a different time zone. You can tell the program to use GMT but putting "!" in front. For example, t=os.date('!*t')

 

To learn about date processing, see this url: http://www.lua.org/pil/22.1.html

Link to comment

Hello,

 

I'm building a cartridge for a nightcache. Does someone have a userscript so I can block the cartridge between 07.00 am and 08.00 pm (for example)???

 

I found some scripts about time but don't know how to insert it in Urwigo

 

Greetz

 

Tjappie W

Netherlands

 

FOUND IT:

I've used (a part of) the script (date/time) of me2d09 en editet a little bit and it worked (see attachment)

 

Caveat: Use GMT to do your calculations. Otherwise, people can bypass your tests by changing the time zone in the GPS.

 

This script is using the time of the GPS??? And i can't edit the time in my gps, the time is set by a gps connection.......

 

Lua can provide two times, current location time and GMT. If you use current location time, I can make that anything I want by telling the GPS I am in a different time zone. You can tell the program to use GMT but putting "!" in front. For example, t=os.date('!*t')

 

To learn about date processing, see this url: http://www.lua.org/pil/22.1.html

 

Very nice!

Thanks

Link to comment

Here are some user functions I created for date and time:

 

--Return the Day of the Year

function FullMoonDay()

t=os.date('*t')

start_day_day=t.day

return start_day_day;

end

 

--Return the Year

function FullMoonYear()

t=os.date('*t')

start_day_year=t.year

return start_day_year;

end

 

--Return the Hour

function FullMoonHour()

t=os.date('*t')

start_day_hour=t.hour

return start_day_hour;

end

 

--Return the Minute

function FullMoonMinute()

t=os.date('*t')

start_day_min=t.min

return start_day_min;

end

 

--Return the Month

function FullMoonMonth()

t=os.date('*t')

start_day_month=t.month

return start_day_month;

end

Link to comment

I've done some editing on the time and date script.

 

In combination with the Dutch Wheater Institute (times of sunrise and sunset) i've made a script for each month of the year. I'm using GMT time including DST.

 

In the attachment you'll see the script for januari, cause the times of sunset en sunrise in februari and the other months are different. Also end march the DST starts and it ends in october.

 

Tequila, thanks for the month-script.

 

Tjappie W

(NL)

post-2010533-1280063662.jpg

post-2010533-1280063673.jpg

Edited by Tjappie W
Link to comment

Hello all!

 

Currently I am getting lost with the following issue: In case a wrong answer is provided to a question (input), this question must be shown again automatically without letting the user to go out and back into a zone.

 

I think it must be something with a loop until a task is complete (providing the correct answer sets a task to complete (this works)).

 

Thanks for your help!

weedboer

 

==>>> EDIT: I found the solution to my problem. Thanks anyway!

Edited by weedboer
Link to comment

This problem is on a Droid phone with the Whereyougo player using urwigo to build the cartridge. I'm not sure if its a urwigo problem or a WhereYouGo problem?

 

I'm writing a user function and can access info like Player.ObjectLocation.latitude. But anything related to cartridge, like cartridge.StartingLocation.latitude tosses an exception. It looks like it's because "cartridge" is a null pointer. Any ideas?

 

Thanks

Link to comment

Wonderful, thanks much. Changed the id to "cartridge", and it works. I made a simple demo of a urwigo cartridge that relocates zones to the local area via a user function if anyone is interested. Its at http://sneakyinternational.net84.net/URWIGODemo.urwigo. It works on a Droid phone using WhereYouGo. Not sure about other devices.

 

Forgot to include the media. A zip file is at http://sneakyinternational.net84.net/urwigoDemo.zip

Link to comment

Hello,

 

I habve some problem with urwigo builder. I have some messages which should displayed to the player depending on several conditions, which were if/else-clauses. That works, but if I want to have each message it's own picture, that doesn't work. Instead the picture of the first message in the if/else clause is taken. Is it a bug or what did I wrong?

 

kind regards

 

streuselmonster

Link to comment

I have a cartridge where the player chooses from three items. How do I get the item that they picked to show up in the Inventory? I need them to take it to the next zone.

 

Thanks,

 

Update: Never mind. I figured it out. Thanks.

Edited by EZtrack
Link to comment

Hi.

I'm working on a WiG that have a speed task. When you reach the end I display via a dialog the value of elapsed time. Now this is in seconds, but 2113 seconds may not say so much.

 

I'v seen that you had a Time and DST discussion earlier so...

 

How should I do to display it in Hours:Minutes:Seconds?

 

====

I just learned from sTeamTraen (Thank you).

You can convert a number to seconds to an H:M:S string in Lua with

os.date("%X",numberofseconds)

But how can I use that with Time.Elapsed parameter?

I could put it in a Function, but how should that look like?

Can I transport a number in and return a string from a Function?

Or can I use a Variable to transport the input/output?

 

ANY suggestions?

post-920481-1281473936.jpg

Edited by Duvhök
Link to comment

Is there a user manual for URWIGO Builder? I can not figure out how to make the first zone active and all others hidden nor how to move task to proper zones? I have used GS builder and have one cache out. thought I would give this one a try and so far I like it but need help.

Link to comment

Is there a user manual for URWIGO Builder? I can not figure out how to make the first zone active and all others hidden nor how to move task to proper zones? I have used GS builder and have one cache out. thought I would give this one a try and so far I like it but need help.

 

I select my zones and look under properties. There's a box that I unchecked that says "Active." I think that will work for you.

Link to comment

Is there a user manual for URWIGO Builder? I can not figure out how to make the first zone active and all others hidden nor how to move task to proper zones? I have used GS builder and have one cache out. thought I would give this one a try and so far I like it but need help.

 

Yes I wonder if there is a manual too...

 

To make the first zone active and all other not: Simply set the value Active true or false per zone as a default. Mark the zone and the properties will appear on the right.

 

I make all zones not active as default. Then at "On start" on the cartridge I make a SET Zone1.Active=TRUE.

 

Tasks, what I know, is not related to zones. Items and characters are.

Link to comment

Wonderful, thanks much. Changed the id to "cartridge", and it works. I made a simple demo of a urwigo cartridge that relocates zones to the local area via a user function if anyone is interested. Its at http://sneakyinternational.net84.net/URWIGODemo.urwigo. It works on a Droid phone using WhereYouGo. Not sure about other devices.

 

Forgot to include the media. A zip file is at http://sneakyinternational.net84.net/urwigoDemo.zip

 

And where did you say it was? I can't find your URL.

Link to comment

Is there a user manual for URWIGO Builder? I can not figure out how to make the first zone active and all others hidden nor how to move task to proper zones? I have used GS builder and have one cache out. thought I would give this one a try and so far I like it but need help.

 

Yes I wonder if there is a manual too...

 

To make the first zone active and all other not: Simply set the value Active true or false per zone as a default. Mark the zone and the properties will appear on the right.

 

I make all zones not active as default. Then at "On start" on the cartridge I make a SET Zone1.Active=TRUE.

 

Tasks, what I know, is not related to zones. Items and characters are.

 

Thats the problem I am having I cant figure out how to set active or not active? I drag the set to the command and then is says both left and right expressions need to be set? but I am clueless at that point? what expression do I use?

thanks

Link to comment

Is there a user manual for URWIGO Builder? I can not figure out how to make the first zone active and all others hidden nor how to move task to proper zones? I have used GS builder and have one cache out. thought I would give this one a try and so far I like it but need help.

 

Yes I wonder if there is a manual too...

 

To make the first zone active and all other not: Simply set the value Active true or false per zone as a default. Mark the zone and the properties will appear on the right.

 

I make all zones not active as default. Then at "On start" on the cartridge I make a SET Zone1.Active=TRUE.

 

Tasks, what I know, is not related to zones. Items and characters are.

 

Thats the problem I am having I cant figure out how to set active or not active? I drag the set to the

command and then is says both left and right expressions need to be set? but I am clueless at that point? what expression do I use?

thanks

 

First drag SET.

Then open the "Zones" on the lower left side. You will see all the zones you made. (Explorer-folder-look-a-like)

Open the zone you interested in and drag the Active to the left of the just dropped SET command.

Mark the right side of the same SET command, now saying FALSE, and tick in the TRUE in properties on the top right side.

post-920481-1281545654.jpg

Link to comment

Wow thanks for the help!! I have my new Wherigo on the way. Can someone help with another issue? After you complete the last task it marks it complete and marks anther one active. I am trying to get it to ask a question and if correct is makes the cache/ final zone active? I am not sure how to get the users input, then compare?

 

PS I am loving this builder. slight learning curve but getting there.

Link to comment

After you complete the last task it marks it complete and marks anther one active. I am trying to get it to ask a question and if correct is makes the cache/ final zone active? I am not sure how to get the users input, then compare?

You can take the Wherigo example "Zooventure Level Three.lua" from the Wherigo.com. Do a File->Import in Urwigo. By trying it in the emulator and investigate it, you will see and learn how that work.

 

Or even more clean, Ranger Fox answered that in another tread. Download his/her Zip and you will see a nice and clean Character Input.urwigo.

 

http://forums.Groundspeak.com/GC/index.php?showtopic=255223

Edited by Duvhök
Link to comment

I have question..I have done simple cartridge with Urwigo. Then I do .gwc file to test it in my device nuvi 500... Start page opens and everything works quite well.

 

Then I decided to upload it to Wherigo...I did .gwz file with Urwigo and uploaded it to Wherigo.com..then I download it into my device nuvi 500...It just shuts down tilts and freezes. What am I doing wrong here..?

 

quick edit..I did test gwc file with that online web compiler found on Wherigo.com from that urwigo qwz file and that worked also..

Edited by small oaks
Link to comment

After you complete the last task it marks it complete and marks anther one active. I am trying to get it to ask a question and if correct is makes the cache/ final zone active? I am not sure how to get the users input, then compare?

You can take the Wherigo example "Zooventure Level Three.lua" from the Wherigo.com. Do a File->Import in Urwigo. By trying it in the emulator and investigate it, you will see and learn how that work.

 

Or even more clean, Ranger Fox answered that in another tread. Download his/her Zip and you will see a nice and clean Character Input.urwigo.

 

http://forums.Groundspeak.com/GC/index.php?showtopic=255223

 

This worked great. Wherigo don now just have to put it on GC.com thanks for the help

Link to comment

Sorry for the double post!

 

I know that this may sound dumb....But.

 

I see the image and icon boxes that say "none".

I'm new at making a cartridge with Urwigo and just can't figure out how to add images and icons so they will show in the boxes so I can select one?

 

:)Solved After about 2 hours I got it figured out! My first cartrige is started.

Are there any Demo's out there that one can use and modify to their own?

Edited by Mickey and Goofy
Link to comment
:) Are there any Demo's out there that one can use and modify to their own?

Yes there are. Read through this thread and you will find many. You have at least three example just above.

Good luck.

 

Thanks I'll go back and read all the logs and look for "Demo's".

I'm working on my first cartridge and it is comming along good and I'm having fun with it.

I'm actually thinking about only placing Wherigo caches only (Less Maintenance and a lot can be done with them.) I have about 3 other cartridge ideas rolling around in my head.

 

What would be a big help with Urwigo would be a list of the the commands and what they do. I'm relating some of them to basic language but still fumbling around with them. For a new person starting out with any of the builders they are a BIG learning curve not everyone knows all those terms.

 

Urwigo is a GREAT PROGRAM and I like it! Thanks for all your work. I make web sites (www.greathides.com for one) and do know how much work can go into a program like Uewigo.

Link to comment

Cartridge problem??

Have my Wherigo built and works great on the emulator but not on colorado 400 or 300? Here is the problem Start Wherigo ok. shows first location ok, shows new message you have a new task ok, go to new task nothing but task name???? it doesnt show whaty to do or give you any options?

Also but not important unlock code crashes builder?

Link to comment

<_< OK I have been working with Urwigo all day so far and have not got anywhere. I have 3 cartridges that I'm looking at but the learning curve has me stumped! The problem is with the "Zooventuer" levels are doing things that I don't want to do and the Urwigo "Actions" and "Expressions" have me stumped. When I put an Action in it needs something else and I just don't know what to do, nothing is working for me?

 

I want to make a Cartridge that has 3 or 4 stages that ask lets say 3 questions each stage with 2 questions leading to a nowhere locations and 1 stage being the corect answer leading to the next stage with the last stage being the final.

 

Is there a demo or .lua out there that I can see or modify to help me get started? I just would like to make one cartridge to get me started.

 

:laughing:Help Please :laughing:

Link to comment

Hello,

 

I habve some problem with urwigo builder. I have some messages which should displayed to the player depending on several conditions, which were if/else-clauses. That works, but if I want to have each message it's own picture, that doesn't work. Instead the picture of the first message in the if/else clause is taken. Is it a bug or what did I wrong?

 

kind regards

 

streuselmonster

 

Hello,

 

the following is an idea to solve the problem from above, but leads to another (user) problem. Instead of using the display message box from the urwigo actions, I want to use user code and there Wherigo.MessageBox{Text=[[blablubb]],Media=zmediawintergarten,} (the code is directly pulled out from gs-Wherigo builder) so I could set the image and so on. But if I want to use, the message box seems to be skipped, it isn't displayed. What did I wrong.

 

Kind regards

 

streuselmonster

Link to comment

Are you trying to display a message box before the input or two message boxes, streuselmonster? Wherigo will show both, but it will do it within a few milliseconds of each other; it will not wait for the player to click a button. You'll have to add the second message box or the input as an action, firing when the player clicks a button in the first one.

Link to comment

:huh: OK I have been working with Urwigo all day so far and have not got anywhere. I have 3 cartridges that I'm looking at but the learning curve has me stumped! The problem is with the "Zooventuer" levels are doing things that I don't want to do and the Urwigo "Actions" and "Expressions" have me stumped. When I put an Action in it needs something else and I just don't know what to do, nothing is working for me?

 

I want to make a Cartridge that has 3 or 4 stages that ask lets say 3 questions each stage with 2 questions leading to a nowhere locations and 1 stage being the corect answer leading to the next stage with the last stage being the final.

 

Is there a demo or .lua out there that I can see or modify to help me get started? I just would like to make one cartridge to get me started.

 

:(Help Please ;)

 

I gave up on "Urwigo" simply because of the lack on "How To" where Wherigo Builder has good how to. It looks like a good program but for a new Cartridge maker it is not easy. :rolleyes:

I'm doing good with Builder so I will stay with it.

Sorry

Link to comment

Has anyone ever managed to upload a URWIGO created GWZ to the Wherigo website and to download it again without getting an error??? I had a quick look at the "_cartridge.lua" inside the URWIGO created GWZ - it has definite syntax differences compared to a lua created by the Wherigo Builder.

I would expect the Wherigo Builder should be able to read the "_cartridge.lua" created by URWIGO but it stops with syntax error messages as well.

 

If I upload my URWIGO GWZ and try to download it again I get something like this:

 

System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ApplicationException: Exception of type 'System.ApplicationException' was thrown. at Groundspeak.Wherigo.ZonesEngine.ZonesEngineDll.LuaDoFile(String filename) at Groundspeak.Wherigo.ZonesLinker.ZonesLinker.CreateZonesFile(String luaFilename, String binaryFilename, String cartridgeId, String playerName, Int64 playerId, String completionCode, DeviceType targetDevice, EngineVersion engineVersion, Boolean bObfuscate) at Groundspeak.Wherigo.ZonesLinker.ZonesLinker.CreateZonesFile(String luaFilename, String binaryFilename, String cartridgeId, String playerName, Int64 playerId, String completionCode, DeviceType targetDevice, EngineVersion engineVersion) at Wherigo.CartridgeService.ExtractCompileCartridgeWithMetaData(GWZMetaData gwzMetaData, String gwzFilename, String cartridgeId, Int64 playerId, String playerName, DeviceType deviceType, String completionCode, String binaryFilename) at Wherigo.CartridgeService.GetCompiledCartridgeWithMetaData(GWZMetaData gwzMetaData, String CartridgeFileName, String CartridgeId, Int64 PlayerId, String PlayerName, DeviceType deviceType, String CompletionCode) --- End of inner exception stack trace --- at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Wherigo.GSPCartridgeService.CartridgeService.GetCompiledCartridgeWithMetaData(GWZMetaData gwzMetaData, String CartridgeFileName, String CartridgeId, Int64 PlayerId, String PlayerName, DeviceType deviceType, String CompletionCode) at cartridge_download.btnDownload_Click(Object sender, EventArgs e)

Link to comment

I've done some editing on the time and date script.

 

In combination with the Dutch Wheater Institute (times of sunrise and sunset) i've made a script for each month of the year. I'm using GMT time including DST.

 

In the attachment you'll see the script for januari, cause the times of sunset en sunrise in februari and the other months are different. Also end march the DST starts and it ends in october.

 

Tequila, thanks for the month-script.

 

Tjappie W

(NL)

 

Okay, got a question about using the "getFormatedTime()" function. I typed it in exactly as shown in your image. I'm using GMT for my times and the park hours are 11:00 to 01:00 GMT (7am to 9pm Eastern Time Zone). Since I'm using GMT, the transition from 23:59 to 0:00 GMT really screws me up. Has anyone noticed that 1:01 GMT actually gets returned by the getFormatedTime() function as 11? Is there anyway to keep the leading zeroes at least in the minutes portion of the time? Would really like the time to be returned as HHMM instead of the current HM format. Any help would be greatly appreciated. Thanks.

Link to comment
Okay, got a question about using the "getFormatedTime()" function. I typed it in exactly as shown in your image. I'm using GMT for my times and the park hours are 11:00 to 01:00 GMT (7am to 9pm Eastern Time Zone). Since I'm using GMT, the transition from 23:59 to 0:00 GMT really screws me up. Has anyone noticed that 1:01 GMT actually gets returned by the getFormatedTime() function as 11? Is there anyway to keep the leading zeroes at least in the minutes portion of the time? Would really like the time to be returned as HHMM instead of the current HM format. Any help would be greatly appreciated. Thanks.

I don't understand that getFormatedTime() function. It asks for the time in UTC and then applies daylight savings to it, but UTC by definition doesn't have daylight savings.

 

I suggest this:

function getFormatedTime()
 return os.date('!%H%M')
end

Link to comment
Okay, got a question about using the "getFormatedTime()" function. I typed it in exactly as shown in your image. I'm using GMT for my times and the park hours are 11:00 to 01:00 GMT (7am to 9pm Eastern Time Zone). Since I'm using GMT, the transition from 23:59 to 0:00 GMT really screws me up. Has anyone noticed that 1:01 GMT actually gets returned by the getFormatedTime() function as 11? Is there anyway to keep the leading zeroes at least in the minutes portion of the time? Would really like the time to be returned as HHMM instead of the current HM format. Any help would be greatly appreciated. Thanks.

I don't understand that getFormatedTime() function. It asks for the time in UTC and then applies daylight savings to it, but UTC by definition doesn't have daylight savings.

 

I suggest this:

function getFormatedTime()
 return os.date('!%H%M')
end

 

When I try your function, it returns the following:

 

Thu Sep 02 01:59:51 2010Thu Sep 02 01:59:51 2010

 

I would have thought it would have just return the Hour and Minutes, but it is returning much more than I wanted. Is it normal for it to return that much info? How do I format my value to compare to the returned function value?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...