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

#MATH Unkown Operator

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help
View previous topic :: View next topic  
Author Message
ryan0_o



Joined: 01 Mar 2010
Posts: 171

PostPosted: Fri Aug 12, 2016 10:40 am    Post subject: #MATH Unkown Operator Reply with quote

Code:

#action {^:::  TICK!}
{
   #foreach {$buff[]} {tmp}
   {
      #if {$buff[$tmp][up]}
      {
         #math {buff[$tmp][time]} {$buff[$tmp][time]-1}
         #if {$buff[$tmp][time] == 1} {#showme ONE TICK ON >>> $tmp <<<}
      }
   }
   
   #if {$auto_buff && $need_buff && $full_stats && !$sleeping}
   {
      #delay {1} {spellup};
   }
}


This is the line throwing the error, everything else works as expected:

Code:

#if {$buff[$tmp][time] == 1} {#showme ONE TICK ON >>>$tmp<<<}


The number is subtracted by 1, as expected. However, it isn't telling me when I have one tick left.
_________________
“The best thing about a boolean is even if you are wrong, you are only off by a bit.”
Back to top
View user's profile Send private message Send e-mail MSN Messenger
ryan0_o



Joined: 01 Mar 2010
Posts: 171

PostPosted: Fri Aug 12, 2016 10:45 am    Post subject: Reply with quote

Okay, it's not throwing an error now. Still isn't working however.

Probably worth noting that I am using an older version of WinTin. The download link/mirrors aren't working for me currently to update.
_________________
“The best thing about a boolean is even if you are wrong, you are only off by a bit.”
Back to top
View user's profile Send private message Send e-mail MSN Messenger
ryan0_o



Joined: 01 Mar 2010
Posts: 171

PostPosted: Fri Aug 12, 2016 6:52 pm    Post subject: Reply with quote

Well I updated my client. Still isn't working. Now I'm running into other problems.

For one, I noticed that I can't use $cnt.corpse to send to the mud. Has to be escaped now apparently with $cnt\.corpse.

But there are things I don't understand like this:

Code:

#if {$my_hp > 600} {keep going} {stop, you're gonna die}

#VARIABLE {my_hp}={355}

#if $my_hp<600 {#showme YEP} {#showme NOPE}
returns YEP


But it isn't working. Same with the first mentioned problem. If I do something like:
Code:

#if {$buff[$tmp][time] == 1} {#showme YEP}
and it will return YEP

But isn't working. Blowing my mind.
_________________
“The best thing about a boolean is even if you are wrong, you are only off by a bit.”
Back to top
View user's profile Send private message Send e-mail MSN Messenger
ryan0_o



Joined: 01 Mar 2010
Posts: 171

PostPosted: Fri Aug 12, 2016 10:35 pm    Post subject: Reply with quote

[img]
https://dl.dropboxusercontent.com/u/3801627/Untitled.png
[/img]

This should explain it.
_________________
“The best thing about a boolean is even if you are wrong, you are only off by a bit.”
Back to top
View user's profile Send private message Send e-mail MSN Messenger
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Tue Aug 16, 2016 4:33 pm    Post subject: Reply with quote

try to use #DEBU ALL to see if something weird is happening
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Thu Aug 25, 2016 6:28 pm    Post subject: Reply with quote

You're missing a ; at the end of several lines.
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 -> Script Help 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