triggerWatch()

From Hack Wars Wiki

Jump to: navigation, search


Function information for triggerWatch()
Function triggerWatch(int number, string key1, variable var1 ... keyN,variable varN)
API HTTP, Hacktendo*
Cost $1,000
Level 30
CPU Usage 3
Description Triggers the watch indicated passing along the variables provided associating them with the keys (in a watch these can be fetched using getTriggerParameter()).

Example

HTTP examples

//triggers the watch #1
triggerWatch(1);
 
//triggers the watch #1 and passes a parameter named "key" 
//with a value of the string "blub" to this watch
triggerWatch(1, "key", "blub") ;


Hacktendo examples

//triggers the watch which comment is hacktendowatch
triggerWatch("hacktendowatch");
 
//triggers the watch which comment is hacktendowatch and passes 
//a parameter named "key"  with a value of the string "blub" to this watch
triggerWatch("hacktendowatch", "key", "blub");

see Hacktendo:Posting_High-Scores

Hacktendo

In the Hacktendo API the first parameter is a string. The watch with the same note will be triggered then. The other parameters are like the HTTP-version.

HTTP

Note that the watch is queued to be triggered when the HTTP script finishes executing, and not executed at the same time or before continuing with the HTTP script.

Personal tools