ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:isserveronly

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
functions:isserveronly [2017/06/13 17:24] – created korshunfunctions:isserveronly [2017/07/16 17:14] korshun
Line 1: Line 1:
 ====== IsServerOnly ====== ====== IsServerOnly ======
-{{tag>info}}+{{tag>zandronum info needs_examples}}
 ''bool IsServerOnly()'' ''bool IsServerOnly()''
  
 ===== Description ===== ===== Description =====
-Returns true if the code is executing only serverside, but not clientside. Shorthand for ''[[IsServer]]() && ![[IsClient]]()''.+Returns true if the code is executing only serverside, but not clientside. **Returns false in singleplayer, unlike [[IsServer]].** Shorthand for ''[[IsServer]]() && ![[IsClient]]()''.
  
-===== Examples ===== 
-The following code will not trigger the error serverside or in singleplayer: 
-<code> 
-if (IsServerOnly()) 
-    Error("This function needs to be executed clientside); 
-<code>