How do i get the value of a remote event that is fired to the server? - luau

I am experiencing problems figuring out how to find/print the value(for now, later i am going to automate it).
game.ReplicatedStorage.Events.GenerateNumber:FireServer() print(game.ReplicatedStorage.Events.GenerateNumber)
i am trying to get the value of of the number generated by the remote event "GenerateNumber".

Related

Synchronous VB6 apparently behaving asynchronously! Crash

We have a legacy VB6 app which has started, from time to time, hangs. We thought it may be to do with a shift to Citrix, but can now replicate the behaviour on a thick client on Win10. We don't think that we have seen this before on earlier Windows versions, but are still checking logs to confirm that.
We experience the behaviour when tabbing into a text box and then tabbing out. As we pass through it, we are making a simple ado call to lookup/validate some data in a text box. As part of the correct program running we are logging
“Opening Dataset: SELECT ... FROM ... ”
“Opened Dataset”
Between these 2 log statements is simple ado data retrieval code with which we have had no problems previously. It is in an ActiveX dll and is running synchronously. Most importantly is that between these 2 log statements there is no DoEvents or api call which would yield control. As far as we can see, it should be a purely synchronous operation.
When the system crashes, which happens sporadically, we can see other logging statements appear between these 2 which can be either resource status (e.g. how much memory, gdi/user objects - which would usually be found because a timer has triggered in the main form) or focus type events - which aren’t timer driven - at least in our codebase.
“Opening Dataset: SELECT ... FROM ... ”
“Resource Status: ...”
“Opened Dataset”```
or
“Opening Dataset: SELECT ... FROM ... ”
“TextItem.OnLostFocus Item1 ...”
“TextItem.Validate ...”
“TextItem.OnGotFocus Item2 ...
“Opened Dataset”
So my initial question is, in what scenario can what should be a synchronous operation be interrupted and appear to act asynchronously.
For example, and we aren’t doing this, I could imagine writing some unsafe code whereby by using a multimedia timer (on another thread) and supplying an AddressOf parameter to the address of a function on one of our modules, that that timer initiates execution of our code, separate to the correct control flow. Other than something like that, I just can’t see how synchronous vb6 code could be interrupted in this way.
I’d be really grateful of any thoughts, suggestions or advice. I’m really sorry if this is soo vague. It perhaps reflects how I’m struggling to get my head round this problem.
Just to say, we tracked this down to Windows 10 plus an old (out of support) socket component we are using. It looks like it is pumping the message queue "at the wrong time" and hence we are seeing UI events appear in the middle of a synchronous process. We don't see this behaviour on earlier Windows versions.
I don't know what may have changed in Win10 which would result in this, but we obviously need to upgrade.
In our case we had a few long running timers to pull status/changes from the DB which caused this. We are using ADO with SQL Native Client and MARS, which worked great up until Windows 10 where intermittent lock ups occurred. Logging and Windbg confirmed this was happening when 2 requests where hitting the ADO connection at the same time. The error from ADO was "Unable to open a logical session" error number -2147467259, and actually caused SQL Server 2014 (running on another machine) to block all other client queries from multiple different applications and machines until the locked up app was killed. I could not replicate this in the IDE as apparently that forces timers to work the way they always did. The fix was to async our ADO implementation and put a connection manager on top of the SQL connections to force requestors to wait their turn (basically taking the Win10 async'd timer feature back out). My only performance impact was the additional few milliseconds of delaying the timer fired SQL query when it collided with a another query.

Parse.com TimeZone necessary for pushes?

When trying to send a push alert through Parse.com, I came across the following warning:
Installations without a known timezone will not receive this campaign.
So, how do I make sure Parse knows a user's timezones? Is there any specific code, or does it to that without the need for code/by default, and this is a moot question?
Thanks!
This is recorded on a per-Installation basis by the Parse library, and should be automatically updated whenever it is updated by the client.
You can verify that Parse is saving time zones by logging into your account, selecting 'Core' (at top) and 'Installation' (at left). You'll see a list of all current installations - the relevant column is timeZone.
The notice that you see when attempting to send a push is just a general reminder, not an indication that there is necessarily anything wrong on your end.
UPDATE 3/1/2015:
I found a bug in this, BTW, that some people might run into. So I'm posting it here in case it might help somebody.
In the current version of Parse, there is a bug wherein an iOS device with their Date & Time "Set Automatically" setting disabled will (potentially) return a timeZone that Parse won't understand. In such an event, local-time scheduled push notifications will not be sent to a user with that setting turned off.
I verified this, myself, on two devices. With "Set Automatically" turned on the Parse Installation is set to "America/Los Angeles" (which is accurate for me). With it turned off, it sets it to "US/Pacific". This is still accurate, obviously, but for some reason Parse does not like that value.
I imagine there are a non-trivial number of iOS users with that setting disabled, so I hope Parse fixes this.

NSUbiquitousKeyValueStoreDidChangeExternallyNotification seems to get lost

Trying to integrate iCloud, and trying to understand NSUbiquitousKeyValueStoreDidChangeExternallyNotification. I have an observer setup to listen for it and everything works as expected, except when internet connection is lost. When it is re-acquired, the observer doesn't pick up any changes that occurred during that downtime. Any subsequent changes at this point get picked up (and also looks like the ones during the downtime get pushed through at this time as well) but I guess my confusion arises since the same observer can notify me of changes when the app first opens, regardless of what changes happened or if the internet was available or not. I would assume the observer would act the same in any case, but I am not seeing that behavior?

Real-time webbrowser game

I'm trying to create a real-time webbrowser game in ASP.Net MVC3, but I'm unsure about what's the best approach to processing 'real-time' events on the server side.
Imagine that the client wants to upgrade a building, upgrading a building takes time. A record gets inserted in the database that holds the end-time and on the client a ajax timer start's running. I was thinking about having a windows service running all the time. Every second the service checks the table and does the real processing when the time passed the end-time. However I could imagine that when you have a huge amount of data to process this can get problematic.
What would be the best way of doing this?
Cheers.
I've seen games like that before. You do not need to count down yourself, you just need to store the datetime for whenever the building will be ready.
When a page is requested you send a timestamp of when the building will be completed, and use javascript to count down. For example, like this.

How to get notification of workflow errors?

I am having issues were a workflow is stalled because there is an issue with sending an email (send email activity). Typically, this is simply solved by resuming the workflow. I'm wondering if there any way to react to a workflow error, so the user knows they need to go in and resume the workflow.
I'm also wondering about this relative to a workflow that is attempting to assign a task to a user who no longer exists in the CRM or one that has an invalid email address, which I'm assuming would cause errors in workflows as well.
Any other suggestions related to this sort if issue would be welcome.
Thanks!
My point of view, is that monitoring can't be done inside CRM, because all CRM processes could be problematic (what happen if a workflow fails to monitor another workflow?)
The way I already done that, was by adding a SQL query (that check the workflow instance state) to a monitoring tool (such as Nagios with the check_mssql_health) or you can just create a small service that will send emails using SMTP.
Off the top of my head, I can't think of an automated way to do it (you could try attaching a workflow to a workflow instance record, but I'm not sure if that will do it).
I'd probably try to build a utility to query workflow instance records, and then notify users if necessary based on their status.

Resources