Squirrel/Server/Functions/Scripts/RegisterRemoteFunc

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Examples)
 
(5 intermediate revisions by one user not shown)
Line 1: Line 1:
{{REGISTERREMOTEFUNC}}
+
{{DISPLAYTITLE:RegisterRemoteFunc}}
 
<div style="border:1px solid #a3bfb1; background:#DFFFDF; width:99%; padding:4px; margin-bottom:10px">
 
<div style="border:1px solid #a3bfb1; background:#DFFFDF; width:99%; padding:4px; margin-bottom:10px">
 
<div style="border:1px solid #a3bfb1; background:#EFFFEF; width:99%; padding:4px">
 
<div style="border:1px solid #a3bfb1; background:#EFFFEF; width:99%; padding:4px">
<div align="center">This function register a function to be called from client side.</div>
+
<div align="center">This function register a server function to be called from client side.</div>
 
</div></div>
 
</div></div>
  
Line 12: Line 12:
 
== Arguments ==
 
== Arguments ==
  
* '''Client-Side String Function''': A function.
+
* '''String Function''': A function.
  
  
 
== Examples ==
 
== Examples ==
<code>
+
<code lang="squirrel">
 
function onScriptLoad ( ) {
 
function onScriptLoad ( ) {
  

Latest revision as of 21:59, 4 August 2014

This function register a server function to be called from client side.


[edit] Syntax

  1. RegisterRemoteFunc ( String Function )


[edit] Arguments

  • String Function: A function.


[edit] Examples

  1.  
  2. function onScriptLoad ( ) {
  3.  
  4. RegisterRemoteFunc ( "Hello" );
  5. }
  6.  
  7. function Hello {
  8.  
  9. // Own script
  10. }
  11.  
Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox