View unanswered posts | View active topics It is currently Fri Dec 26, 2025 1:43 am



Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
 Momboat Stats 
Author Message
Ensign
User avatar

Joined: Mon Dec 26, 2011 8:41 am
Posts: 210
Unread post Re: Momboat Stats
Micro wrote:
I don't have internet right now, but the last time I played it was still an issue. The source I had was from Helix's started kit. I tried several versions of TWX, and mombot on several different servers, and it always saved "$MULTIPLE_PHOTONS" = "1" instead of "$MULTIPLE_PHOTONS" = "True" in the twx config file. If I changed this manually, it worked fine.


As far as I know, TRUE=1, and that's how it's saved in .cfg.

I did a little testing to confirm, using twx 2.05:

test script:
Code:
setVar $TRUTH TRUE
saveVar $TRUTH
loadVar $TRUTH
echo "*$TRUTH: " & $TRUTH

setVar $strTRUTH "TRUE"
saveVar $strTRUTH
loadVar $strTRUTH
echo "*$strTRUTH: " & $strTRUTH

setVar $intTRUTH 1
saveVar $intTRUTH
loadVar $intTRUTH
echo "*$intTRUTH: " & $intTRUTH
halt


output:
Code:
$TRUTH: 1
$strTRUTH: TRUE
$intTRUTH: 1


twx cfg file:
Code:
$TRUTH=1
$STRTRUTH=TRUE
$INTTRUTH=1


now try to use those vars:
Code:
if ($intTRUTH)
  echo "*($intTRUTH)"
end
if ($TRUTH)
  echo "*($TRUTH)"
end
if ($strTRUTH)
  echo "*($strTRUTH)"
end


output:
Code:
($intTRUTH)
($TRUTH)Script run-time error in 'ACTEST.TS': 'TRUE' is not a number, line 26
Script terminated: scripts\actest.ts


hmm, it's not recognizing $STRTRUTH=TRUE, only $STRTRUTH=1. The problem is it's treating TRUE as "TRUE".

Even if I try
Code:
IF ($STRTRUTH=TRUE)


Same result, 'TRUE' is not a number.

If I'm right, loadVar $var is (incorrectly?) assigning the value "TRUE" instead of "1" when we have the line $VAR=TRUE in the .cfg.

Possibly, there was a change made to both saveVar and loadVar that saves/loads as 1 instead of TRUE, which would make sense to me except that it breaks when there are already vars saved in the config, or if any of the scripts use SaveVar "TRUE" (which is sort of wrong, but would have worked in previous versions) instead of SaveVar TRUE.

At least, that's how it looks to me. I could be completely wrong... hopefully EP will be able to shed light when he reads this.

_________________
I'm a monkey and I have mad monkey skills for hire.
https://codemonkeyfromspace.com


Sat Oct 05, 2013 11:54 am
Profile ICQ WWW
Veteran Op
User avatar

Joined: Sat Dec 29, 2007 5:06 pm
Posts: 2059
Location: Oklahoma
Unread post Re: Momboat Stats
I uploaded the last version I worked on to grimytrader.com.

_________________
T0yman (Permanently Retired since 2012)
Proverbs 17:28 <-- Don't know it, most should it would stop a lot of the discussions on here.


Sat Oct 05, 2013 12:35 pm
Profile ICQ YIM WWW
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: Momboat Stats
T0yman wrote:
I uploaded the last version I worked on to grimytrader.com.


I can't create an account there since the email validation is broken. :?

It was just a minor anoyance anyway. Not a bid deal.

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Sun Oct 06, 2013 4:29 am
Profile ICQ YIM WWW
Boo! inc.

Joined: Fri Jan 04, 2002 3:00 am
Posts: 221
Location: Canada
Unread post Re: Momboat Stats
here is the file he posted on grimy. i still had an account there.


Attachments:
mom_bot3_1044.ts [393.6 KiB]
Downloaded 658 times
Sun Oct 06, 2013 9:25 pm
Profile
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post Re: Momboat Stats
Thanks

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/zvEbArscMN


Mon Oct 07, 2013 4:25 am
Profile ICQ YIM WWW
Display posts from previous:  Sort by  
Reply to topic   [ 20 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users and 34 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.