Simple Machine Codes
April 16, 2024, 12:53:38 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Gallery Affiliates Code Index Staff List Calendar Members Login Register  

Don't forget to use escape keys!

Pages: [1]   Go Down
  Print  
Author Topic: Don't forget to use escape keys!  (Read 1137 times)
0 Members and 1 Guest are viewing this topic.
Kalphiter
100 Club Member

Offline Offline

Gender: Male
Posts: 203


Never forget to drink coffee.


View Profile
« on: July 09, 2008, 01:07:02 pm »

Is it alright if someone could sticky this Cheesy


Well, it would help a lot of people and give Agent Moose and some other people a rest!

Well, I see some people not getting codes to work. Sometimes it's something else. Sometimes it is a missing escape key. Look for "(/\[spoiler\](.*)[\/spoiler\]/i)" in this:
Code: (JS)
<script>
var b = document.getElementsByTagName("div");
//Created by Agent Moose (smcodes.smfforfree3.com)
for(x=0;x<b.length;x++){
if(b[x].className=="post" && b[x].innerHTML.match\(/\[spoiler\](.*)[\/spoiler\]/i)){
b[x].innerHTML = b[x].innerHTML.replace("[spoiler]" + RegExp.$1 + "[/spoiler]","<div><div><a href='javascript:void(0)' onclick='$(this).parent().next().toggle()'>(Click to Show/Hide Spoiler)</a></div><div style='display:none' id='spoiler'>" + RegExp.$1 + "</div></div>");
};};
</script>

You see how \[spoiler\] is not [spoiler]? Here is where it starts.


You could go to "add a tab v1" and look at it. If you wanted to add a new tab BBC/HTML, you'd have to do this

Code: (JS)
links[0] = ["LINKS NAME","URL FOR LINK"]
links[0] = ["BBC\/HTML","http://www.something.com/bbchtml.htm"]

(if you did not put a backslash it would try dividing BBC by HTML and last time I checked acronyms(words nevertheless) can't be divided by each other, unless they were set integers/variables)

Many programming/scripting languages require escape characters such as JavaScript, PHP, and Java. However, remember that if you want to divide something, such as...

Code: (JS)
int year = 365
int month = year/12

...that you don't need "\/".

Currently here are symbols that require escape characters(unless you were to actually use them as operators)

[
]
+
-
*
/
=
'
"
%
! (Maybe not, but I think it is because it is also an operator)
<
>
« Last Edit: July 10, 2008, 02:56:09 pm by Kalphiter » Report Spam   Logged

Java is your friend.

Share on Facebook Share on Twitter

Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« Reply #1 on: July 09, 2008, 01:20:25 pm »

Accually, this would go in the tutorial section Smiley  Good job Smiley
Report Spam   Logged

Kalphiter
100 Club Member

Offline Offline

Gender: Male
Posts: 203


Never forget to drink coffee.


View Profile
« Reply #2 on: July 10, 2008, 02:53:53 pm »

Than move it pretty pleasE?
Report Spam   Logged

Java is your friend.
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« Reply #3 on: July 14, 2008, 04:27:49 pm »

I did move it, its in the tutorials section...
Report Spam   Logged

Kalphiter
100 Club Member

Offline Offline

Gender: Male
Posts: 203


Never forget to drink coffee.


View Profile
« Reply #4 on: July 14, 2008, 05:33:40 pm »

I did move it, its in the tutorials section...
No, it was supposed to be in the "SMF for free codes" since it has to do with possibly people making new codes, or just people who are using the codes. It isn't a tutorial it's a tip thingy.
Report Spam   Logged

Java is your friend.
CodeLover
100 Club Member

Offline Offline

Gender: Male
Posts: 331


View Profile
« Reply #5 on: July 16, 2008, 04:30:04 pm »

It's fine where it is, IMO.

Surprisingly I never forget escapes. Odd, seeing as I always forget everything else Cheesy
Report Spam   Logged

Don't get mad at me if I'm acting immature - I'm only 10 Grin


Kalphiter
100 Club Member

Offline Offline

Gender: Male
Posts: 203


Never forget to drink coffee.


View Profile
« Reply #6 on: July 16, 2008, 07:16:20 pm »

It's fine where it is, IMO.

Surprisingly I never forget escapes. Odd, seeing as I always forget everything else Cheesy
Wow... Cheesy
Report Spam   Logged

Java is your friend.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy