TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Broke script with ver 2.00.1

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
blkno1



Joined: 03 Dec 2007
Posts: 117

PostPosted: Mon Apr 05, 2010 4:20 pm    Post subject: Broke script with ver 2.00.1 Reply with quote

I can't tell what happened, I'm guessing something with #math may be different.

The playerhigh and playerlow vars wont populate..

Code:
#action {%1 players online now,} {#var playersonline %1}

#alias pltrack
{
   #var playersonline2 $playersonline;
   #if {$playersonline >= $playerhigh} {#var playerhigh $playersonline};
   #if {$playersonline <= $playerlow} {#var playerlow $playersonline2}
   
}




Here is the debug out put of ver 2.00.0

Quote:
#DEBUG ALIAS {pltrack} {}
[02] variable playersonline2 $playersonline
#OK. VARIABLE {playersonline2} HAS BEEN SET TO {122}.
[10] if {$playersonline >= $playerhigh}
[02] variable playerhigh $playersonline
#OK. VARIABLE {playerhigh} HAS BEEN SET TO {122}.
[05] endif
[10] if {$playersonline <= $playerlow}
[02] variable playerlow $playersonline2
#OK. VARIABLE {playerlow} HAS BEEN SET TO {122}.
[05] endif



and the debug of 2.00.1

Quote:
#DEBUG ALIAS {pltrack} {}
[02] variable playersonline2 $playersonline
#OK. VARIABLE {playersonline2} HAS BEEN SET TO {123}.
[10] if {$playersonline >= $playerhigh}
[05] endif
[10] if {$playersonline <= $playerlow}
[05] endif
Back to top
View user's profile Send private message Yahoo Messenger
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Mon Apr 05, 2010 6:05 pm    Post subject: Reply with quote

Looks like a problem with using uninitialized variables.

I'll look into it.
Back to top
View user's profile Send private message Send e-mail
blkno1



Joined: 03 Dec 2007
Posts: 117

PostPosted: Tue Apr 13, 2010 5:22 am    Post subject: Reply with quote

Hmmm well I added the #vars to initialize the variables but the $playerlow still doesn't get populated. If I enter #var playerlow $playersonline2 directly into tintin++ it works, seems the 2nd if heres isnt firing.


Code:
#action {%1 players online now,} {#var playersonline %1}

#var playerhigh {0}
#var playerlow {0}
#var playersonline {0}
#var playersonline2 {0}

#alias pltrack
{
   #var playersonline2 $playersonline;
   #if {$playersonline >= $playerhigh} {#var playerhigh $playersonline};
   #if {$playersonline <= $playerlow} {#var playerlow $playersonline2}
   
}

#alias ttest {#showme 71 players online now,}

#alias tt
{
#var playersonline;
#var playersonline2;
#var playerhigh;
#var playerlow;
}
Back to top
View user's profile Send private message Yahoo Messenger
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Tue Apr 13, 2010 7:11 am    Post subject: Reply with quote

Initialize playerlow as 1000 instead of 0, and it should update.
Back to top
View user's profile Send private message Send e-mail
blkno1



Joined: 03 Dec 2007
Posts: 117

PostPosted: Tue Apr 13, 2010 6:31 pm    Post subject: Reply with quote

Setting it at 1000 it just goes back to zero and stays 0.



Quote:
#VARIABLE {playersonline}={0}
#VARIABLE {playersonline2}={0}
#VARIABLE {playerhigh}={0}
#VARIABLE {playerlow}={1000}

logdata

106 players online now, use WHO.

#VARIABLE {playersonline}={106}
#VARIABLE {playersonline2}={0}
#VARIABLE {playerhigh}={0}
#VARIABLE {playerlow}={0}

logdata

107 players online now, use WHO.

#VARIABLE {playersonline}={107}
#VARIABLE {playersonline2}={106}
#VARIABLE {playerhigh}={106}
#VARIABLE {playerlow}={0}
Back to top
View user's profile Send private message Yahoo Messenger
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Tue Apr 13, 2010 8:14 pm    Post subject: Reply with quote

Works for me. So I guess it's something outside of what you posted that's messing things up.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group