i want to let this event run when a player registered a new account and i try to do that from the RegistrationRequest in cloud code.
my code there looks like this
var request = new SparkRequests.LogEventRequest();
request.eventKey = "PROGRESS_QUERRY";
request.PATH = "Characters.Slot_1";
var result = request.Execute();
and it happens nothing.
The script (PROGRESS_QUARRY) works when i execute it for myself but not called / executed from cloud code "RegistrationRequest"
Customer Support
said
over 3 years ago
Hi Micahel,
It's not going to run in the RegistrationRequest as the player hasn't been authenticated at that point. Place it in the RegistrationResponse and you should see it run as expected.
Rizwan Akram
Hello
According to following link it is not possible to request custom events using Cloud Code. Is this still true?
https://support.gamesparks.net/support/discussions/topics/1000049749
Thanks
Hi Rizwan,
You can send LogEventRequests in cloud code using SparkRequests. The syntax looks like this:
var request = new SparkRequests.LogEventRequest;
request.eventKey = "myEvent";
request.myCustomAttribute1 = myValue;
var result = request.Execute();
or, to send it as a player other than the one currently logged in you would use
var result = request.ExecuteAs(playerId);
Regards,
Vinnie
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Hi Rizwan,
You can send LogEventRequests in cloud code using SparkRequests. The syntax looks like this:
var request = new SparkRequests.LogEventRequest;
request.eventKey = "myEvent";
request.myCustomAttribute1 = myValue;
var result = request.Execute();
or, to send it as a player other than the one currently logged in you would use
var result = request.ExecuteAs(playerId);
Regards,
Vinnie
Michael David Kischel
Hi, this is not working for me at all or i am not quiet clever as i should be for this.
I have an event called PROGRESS_QUERRY what takes a PATH as input..
i want to let this event run when a player registered a new account and i try to do that from the RegistrationRequest in cloud code.
my code there looks like this
and it happens nothing.
The script (PROGRESS_QUARRY) works when i execute it for myself but not called / executed from cloud code "RegistrationRequest"
Customer Support
Hi Micahel,
It's not going to run in the RegistrationRequest as the player hasn't been authenticated at that point. Place it in the RegistrationResponse and you should see it run as expected.
Regards,
Liam
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2485 topics