inherit
60633
0
Nov 23, 2024 23:53:28 GMT -8
Joilet
Lightning does strike the same place twice or more be careful
2,809
October 2005
joilet
|
Post by Joilet on Apr 2, 2016 17:12:34 GMT -8
GML stands for Game Maker Language I will use example Game Maker Language to show you what I mean of coding I want to know how to do anyways below is a GML version example of what I want to do with HTML language:
if (!variable_local_exists("visit")) then { var visit; visit = 0; } else if (variable_local_exists("visit")) then { if (visit < 1) { show_message("Please click on OK to close this message box, thank you."); } }
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,846
January 2015
msg
|
Post by Lynx on Apr 2, 2016 20:35:01 GMT -8
And who would this apply to? Members? Members and guests (probably have to use a cookie or localStorage for guests)? Of course, if you're looking for just the code, this will have to save via cookie or localStorage. If someone clears their cookies though (if saved by cookie) it'll show the message again. If plugin fashion, would "visit" be saved via cookies / localStorage (if guest) and by key for members (possibly new members)? Also, is message from a popup?
Oh, and that's probably not the whole code you posted above. If it is, "visit" is never incremented nor saved, which would mean your first if would be the one that always hits true. A few more details could really help shed some light of your thoughts behind this and how you'd like it to work.
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Apr 4, 2016 2:49:31 GMT -8
GML stands for Game Maker Language I will use example Game Maker Language to show you what I mean of coding I want to know how to do anyways below is a GML version example of what I want to do with HTML language:
if (!variable_local_exists("visit")) then { var visit; visit = 0; } else if (variable_local_exists("visit")) then { if (visit < 1) { show_message("Please click on OK to close this message box, thank you."); } }
They have plugins that welcome members on logging in and others that use a popup to tell guests to register
|
|