User Tools

Site Tools


function

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
function [2014/07/23 12:33]
l [visited(string, string...)]
function [2017/10/10 00:39] (current)
Line 1: Line 1:
 +<- [[expression|About Expressions]] --------- [[print|Printing Variables and Functions]] ->
 +
 ===== Functions ===== ===== Functions =====
  
Line 74: Line 76:
 **Advanced use**: if you want to display something on every third time you visit a passage (no matter if you visit it 3 times, 10 times, or 100 times), then you can use the [[expression|modulo operator]] ''​%''​ to transform the number: **Advanced use**: if you want to display something on every third time you visit a passage (no matter if you visit it 3 times, 10 times, or 100 times), then you can use the [[expression|modulo operator]] ''​%''​ to transform the number:
 <​code><<​if visited() % 3 is 0>>\ <​code><<​if visited() % 3 is 0>>\
-"Every 3 visits to this passage, I walk the Earth again,"​ croons Count Dracula.\ +"Every 3 visits to this passage, I walk the Earth again,"​ croons Count Dracula. 
-<<​endif>></​code>​+<<​endif>>​\</​code>​
 Feel free to modify the "​3"​ to any number you wish, to make something happen on every four visits, every ten visits, etc. Feel free to modify the "​3"​ to any number you wish, to make something happen on every four visits, every ten visits, etc.
  
Line 139: Line 141:
  
  
 +<- [[expression|About Expressions]] --------- [[print|Printing Variables and Functions]] ->
  
function.1406118805.txt.gz · Last modified: 2017/10/10 00:37 (external edit)