ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


client_server_detection

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
client_server_detection [2019/09/05 23:53]
korshun [Writing robust multiplayer code]
client_server_detection [2019/09/05 23:54]
korshun [Writing robust multiplayer code]
Line 53: Line 53:
     // writing if (IsClient()) would incorrectly display the warning in singleplayer.     // writing if (IsClient()) would incorrectly display the warning in singleplayer.
     if (!IsServer())     if (!IsServer())
-        printbold(s:"Error: ServersideOnlyFunction must not be called clientside");+        printbold(s:"Error: ServersideOnlyFunction was called clientside"); 
 +         
 +    ...
 } }
  
Line 60: Line 62:
     // writing if (IsServer()) would incorrectly display the warning in singleplayer.     // writing if (IsServer()) would incorrectly display the warning in singleplayer.
     if (!IsClient())     if (!IsClient())
-        printbold(s:"Error: ClientsideOnlyFunction must not be called serverside");+        printbold(s:"Error: ClientsideOnlyFunction was called serverside"); 
 +         
 +    ...
 } }
 </code> </code>
client_server_detection.txt · Last modified: 2019/09/05 23:54 by korshun