Cyber Syndicate
<center><p style='font-size:120%;'><strong>Welcome to Cyber Syndicate!<strong></p>

You are visiting as a guest; please <strong>register</strong> or <strong>log in</strong>.

Being logged in provides many benefits, including access to the useful <strong>Methods forum</strong>, posting permissions, and voting permissions.

<strong>Enjoy.</strong></center>
Cyber Syndicate
<center><p style='font-size:120%;'><strong>Welcome to Cyber Syndicate!<strong></p>

You are visiting as a guest; please <strong>register</strong> or <strong>log in</strong>.

Being logged in provides many benefits, including access to the useful <strong>Methods forum</strong>, posting permissions, and voting permissions.

<strong>Enjoy.</strong></center>
Cyber Syndicate
Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
HomeLatest imagesRegisterLog in

 

 TRAPS_SET++; changes value to 2 or 3 not to 1?

Go down 
4 posters
AuthorMessage
SmokeBarrage
Member
Member



Posts : 5
Join date : 2011-02-27

TRAPS_SET++; changes value to 2 or 3 not to 1? Empty
PostSubject: TRAPS_SET++; changes value to 2 or 3 not to 1?   TRAPS_SET++; changes value to 2 or 3 not to 1? Icon_minitimeTue Mar 01, 2011 7:16 am

Hey, Like the title says...I added TRAPS_SET++; butt it changes value to 2 or 3 which is bad because my loop contains this:
Code:
if (atLiz1() &&
            Skills.getCurrentLevel(Skills.HUNTER) < 40 && [color=red]TRAPS_SET < 2[/color]) {
               set();
               catched();
               fallen();
            } else if (Skills.getCurrentLevel(Skills.HUNTER) > 40 && [color=red]TRAPS_SET < 3[/color]) {
               set();
               catched();
               fallen();
IDK what to do...
Back to top Go down
Akimwarrior
Designer
Designer



Posts : 30
Join date : 2011-02-27

TRAPS_SET++; changes value to 2 or 3 not to 1? Empty
PostSubject: Re: TRAPS_SET++; changes value to 2 or 3 not to 1?   TRAPS_SET++; changes value to 2 or 3 not to 1? Icon_minitimeTue Mar 01, 2011 8:53 am

i don't get it.

Traps_SET++; --> will add 1

so if it loops it will be 2, 3, 4, 5 etc
Back to top Go down
b0xb0x
Administrator
Administrator



Posts : 130
Join date : 2011-02-25
Age : 28
Location : California

TRAPS_SET++; changes value to 2 or 3 not to 1? Empty
PostSubject: Re: TRAPS_SET++; changes value to 2 or 3 not to 1?   TRAPS_SET++; changes value to 2 or 3 not to 1? Icon_minitimeTue Mar 01, 2011 10:00 pm

You may be looping twice in the time meant for once. Add a timer and if the timer is not running, then ++ and reset.
Back to top Go down
https://cybersyndicate.forumotion.com
SmokeBarrage
Member
Member



Posts : 5
Join date : 2011-02-27

TRAPS_SET++; changes value to 2 or 3 not to 1? Empty
PostSubject: Re: TRAPS_SET++; changes value to 2 or 3 not to 1?   TRAPS_SET++; changes value to 2 or 3 not to 1? Icon_minitimeWed Mar 02, 2011 7:41 am

I fixed it.Did it like this...it was because of lag.
@Override
public void messageReceived(MessageEvent e) {
final String message = e.getMessage().toLowerCase();
if (message.contains("caught")) {
SALAS++;
if (message.contains("dismantle")) {
TRAPS_SET--;
if (message.contains("setting")) {
TRAPS_SET++;
if (message.contains("collapsed")) {
TRAPS_SET--;
}
}
}
}
So its not: 1 click = TRAPS__SET++
Back to top Go down
Remo
Member
Member



Posts : 41
Join date : 2011-03-10

TRAPS_SET++; changes value to 2 or 3 not to 1? Empty
PostSubject: Re: TRAPS_SET++; changes value to 2 or 3 not to 1?   TRAPS_SET++; changes value to 2 or 3 not to 1? Icon_minitimeFri Mar 11, 2011 2:48 pm

Quick question. What does the "
Code:
" [color=red] | [/color] "
" do?
Back to top Go down
b0xb0x
Administrator
Administrator



Posts : 130
Join date : 2011-02-25
Age : 28
Location : California

TRAPS_SET++; changes value to 2 or 3 not to 1? Empty
PostSubject: Re: TRAPS_SET++; changes value to 2 or 3 not to 1?   TRAPS_SET++; changes value to 2 or 3 not to 1? Icon_minitimeFri Mar 11, 2011 2:54 pm

Remo wrote:
Quick question. What does the "
Code:
" [color=red] | [/color] "
" do?

He was probably trying to color the error red but I guess it didn't work.
Back to top Go down
https://cybersyndicate.forumotion.com
Remo
Member
Member



Posts : 41
Join date : 2011-03-10

TRAPS_SET++; changes value to 2 or 3 not to 1? Empty
PostSubject: Re: TRAPS_SET++; changes value to 2 or 3 not to 1?   TRAPS_SET++; changes value to 2 or 3 not to 1? Icon_minitimeFri Mar 11, 2011 2:57 pm

b0xb0x wrote:
Remo wrote:
Quick question. What does the "
Code:
" [color=red] | [/color] "
" do?

He was probably trying to color the error red but I guess it didn't work.
Oh lol. I thought it was part of the script.
Back to top Go down
Sponsored content





TRAPS_SET++; changes value to 2 or 3 not to 1? Empty
PostSubject: Re: TRAPS_SET++; changes value to 2 or 3 not to 1?   TRAPS_SET++; changes value to 2 or 3 not to 1? Icon_minitime

Back to top Go down
 
TRAPS_SET++; changes value to 2 or 3 not to 1?
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Cyber Syndicate :: Development :: Scripting Help-
Jump to: