Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


;-; what is wrong?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam
View previous topic :: View next topic  
Author Message
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Thu Jun 10, 2010 3:38 pm    Post subject: ;-; what is wrong? Reply with quote

Code:
// ==UserScript==
// @name           adding text styling test
// @namespace      http://forum.cheatengine.org/*
// @include        *forum.cheatengine.org/*
// ==/UserScript==
var postButton = document.forms.namedItem("post").elements.namedItem("post");
var newmsg = "";
var oldmsg = "";

function FLQ(){
var evalutaionMessage = document.forms.namedItem("post").elements.namedItem("message");
var newmsgpos;
   while (parseInt(evaluationMessage.value.search("[/quote]")) != -1 ){
   newmsgpos = evaluationMessage.value.search("[/quote]");
   evaluationMessage.value.replace("[/quote]","[/oldquote]");
   }
   newmsg = evaluationMessage.substring(newmsgpos + 8);
   oldmsg = evaluationMessage.substring(0,newmsgpos + 8);
   
      

function styling(newmsg,oldmsg)
{
 FLQ();
   var postMessage = document.forms.namedItem("post").elements.namedItem("message");
      postMessage.value=oldmsg+"[color=darkblue][size=9] "+newmsg+" [/size][/color]";
 
}

postButton.addEventListener("click", styling, true);


Last edited by gogodr on Thu Jun 10, 2010 4:00 pm; edited 2 times in total
Back to top
View user's profile Send private message MSN Messenger
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Thu Jun 10, 2010 3:38 pm    Post subject: Reply with quote

Error console log?
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel
Back to top
View user's profile Send private message
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Thu Jun 10, 2010 3:40 pm    Post subject: Reply with quote

Haxory' wrote:
Error console log?
where is that?

testing there was a missing.value after evaluationMessage

;-; that was not it ;-;
Back to top
View user's profile Send private message MSN Messenger
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Thu Jun 10, 2010 3:40 pm    Post subject: Reply with quote

Err, the line should be given in the firefox error console, it's pretty neat.
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel
Back to top
View user's profile Send private message
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Thu Jun 10, 2010 3:44 pm    Post subject: Reply with quote

Haxory' wrote:
Err, the line should be given in the firefox error console, it's pretty neat.

oh nice, test

syntax error

while (evaluationMessage.value.search("[/quote]") <> -1 ){


but it should be fine ...
oh wait I know


is there any string to number function ?
Back to top
View user's profile Send private message MSN Messenger
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Thu Jun 10, 2010 3:48 pm    Post subject: Reply with quote

Isnt it != in javascript?
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel
Back to top
View user's profile Send private message
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Thu Jun 10, 2010 3:52 pm    Post subject: Reply with quote

Surprised Surprised
yeah

and also I needed to use parseInt()

----
updated code up there.

now it says syntax error at line 31

THERE IS NO LINE 31 !
Back to top
View user's profile Send private message MSN Messenger
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Thu Jun 10, 2010 3:57 pm    Post subject: Reply with quote

gogodr wrote:
Surprised Surprised
yeah

and also I needed to use parseInt()

----
updated code up there.

now it says syntax error at line 31

THERE IS NO LINE 31 !


:S

Dont know what's the problem then, sorry Sad

_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel
Back to top
View user's profile Send private message
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Thu Jun 10, 2010 4:00 pm    Post subject: Reply with quote

Haxory' wrote:
gogodr wrote:
Surprised Surprised
yeah

and also I needed to use parseInt()

----
updated code up there.

now it says syntax error at line 31

THERE IS NO LINE 31 !


:S

Dont know what's the problem then, sorry Sad

oh wait.. test
there was a} in thw rong place.. but it wasnt it..
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites