View unanswered posts | View active topics It is currently Fri Mar 29, 2024 3:59 am



Reply to topic  [ 9 posts ] 
 Haggle In world trade twx 2.05 
Author Message
Commander

Joined: Thu Oct 17, 2002 2:00 am
Posts: 1158
Unread post Haggle In world trade twx 2.05
Getting this line frequently.

them for 1,152 credits.
Your offer [Script run-time error in 'HAGGLE': '' is not a number, line 223

Script terminated: scripts\2_worldtrade.ts



Anyone know what could be causing it? I've never been fine tuned for scripts.

TWGS V 2.20B

Quest TWGS is what it's on.


Wed Mar 18, 2015 11:18 am
Profile
Civilian

Joined: Thu Mar 12, 2015 2:06 pm
Posts: 0
Unread post Re: Haggle In world trade twx 2.05
I don't know what's causing your bug, but I would use the uncompiled version of world trade and insert some debug statements before line 223 is executed.

this is from the v. 2.03 source release, so idk if anything's been modified, but it looks like it's getting some unexpected (non-numerical) value as $firstOffer

e.g.
getWord CURRENTLINE $firstOffer 3

since it's just hardcoded based on an index position, could something have changed in the new TWGS release?

anyhow, I would try to print out the contents of $firstOffer prior to the point of failure. Also wouldn't hurt to take a look at whatever is being parsed as CURRENTLINE, in case the error is further up the chain.

if ($firstOffer = 0)
getWord CURRENTLINE $firstOffer 3

echo CURRENTLINE
echo $firstOffer

stripText $firstOffer "["
stripText $firstOffer "]"
stripText $firstOffer ","
end

... but really I'm just guessing... I haven't played TW in a decade and I don't even have twx 2.05 installed (is this a thing? where is it hosted?)


Wed Mar 18, 2015 11:58 am
Profile
Commander

Joined: Sun Feb 25, 2001 3:00 am
Posts: 1837
Location: Guam USA
Unread post Re: Haggle In world trade twx 2.05
Comet wrote:
Getting this line frequently.

them for 1,152 credits.
Your offer [Script run-time error in 'HAGGLE': '' is not a number, line 223

Script terminated: scripts\2_worldtrade.ts



Anyone know what could be causing it? I've never been fine tuned for scripts.

TWGS V 2.20B

Quest TWGS is what it's on.


That looks like the getword or cuttext command did not get the number
or the settexttrigger was not set to grab after the target number.
One other thing it could be , is when it grabs a number it did not have a striptext (variable) ","
so that 1,250 would be a number 1250

Without seeing the actual code I can only offer ideas based on the error shown.

Hope this helps.
If you have the .ts script of the file your running , I'll fix it for you.
But my guess is that its the haggle routeen in your includes that has the erroneous code.

I may have fixed this a few years back.
If you want to try my .cts to see if you have same issue ?

Attachment:
File comment: This is the .cts I use.
2_WorldTrade.cts [73.33 KiB]
Downloaded 568 times


Vid Kid/CareTaker

_________________
TWGS V2 Vids World on Guam Port 2002
Telnet://vkworld.ddns.net:2002
Discord @ DiverDave#8374
Vid's World Discord

Founding Member -=[Team Kraaken]=- Ka Pla

Image
Winners of Gridwars 2010
MBN Fall Tournament 2011 winners Team Kraaken
Undisputed Champions of 2019 HHT Just for showing up!

The Oldist , Longist Running , Orginal Registered Owner of a TWGS server :
Vids World On Guam


Fri Mar 20, 2015 5:18 am
Profile WWW
Commander

Joined: Thu Oct 17, 2002 2:00 am
Posts: 1158
Unread post Re: Haggle In world trade twx 2.05
Thanks Vid i'll run this for a few days and see what happens. Appreciate the assistance. I thought it was my Haggle Script. I've sent you the haggle script via email that I have. It's nothing special. I just pulled it from grimy trader when I downloaded 2.05 TWX.

Thanks!


Fri Mar 20, 2015 8:23 am
Profile
Commander

Joined: Sun Feb 25, 2001 3:00 am
Posts: 1837
Location: Guam USA
Unread post Re: Haggle In world trade twx 2.05
I fixed your haggle script and resent it back to you.

I hope it works the way you intended it to.
The only problem I found was when it was written
scripts ran slower on TWGS v1 , but on v2 you have to mod scripts
to set trigger grab after the target data or you end up grabbing nothing.

in this case the line it was in :
"Your offer [XXX] ?"
originally triggered on:
"Your offer ["
now triggers on:
"] ?"

This is just one example of script changes between TWGS v1 and v2
scripts .. and then they will work on both versions.

Hope this helps.

Vid

_________________
TWGS V2 Vids World on Guam Port 2002
Telnet://vkworld.ddns.net:2002
Discord @ DiverDave#8374
Vid's World Discord

Founding Member -=[Team Kraaken]=- Ka Pla

Image
Winners of Gridwars 2010
MBN Fall Tournament 2011 winners Team Kraaken
Undisputed Champions of 2019 HHT Just for showing up!

The Oldist , Longist Running , Orginal Registered Owner of a TWGS server :
Vids World On Guam


Fri Mar 20, 2015 3:41 pm
Profile WWW
Gunnery Sergeant

Joined: Wed Sep 25, 2002 2:00 am
Posts: 27
Location: USA
Unread post Re: Haggle In world trade twx 2.05
I've ran into the same issue I'll have to give this a try

_________________
Krimsonnblade


Mon May 25, 2015 2:24 am
Profile ICQ
Warrant Officer
User avatar

Joined: Thu May 09, 2013 2:21 pm
Posts: 73
Unread post Re: Haggle In world trade twx 2.05
You are getting the exact same error that comet was getting, down to the line and everything? Are you playing on a V2 or V1 server? Post the source of the script (if available) that is giving you trouble and the error message as it appears in TW.

_________________
-Zoom

Zoom's Team Speak3 Server @ ts3server://vs26.tserverhq.com:7214
TradeWars2002: The Basics @ http://playtwars.altervista.org


Mon May 25, 2015 4:17 am
Profile
Gunnery Sergeant

Joined: Wed Nov 22, 2006 3:58 am
Posts: 22
Location: Canada
Unread post Re: Haggle In world trade twx 2.05
Can`t help you much; as I suck at script writing. But I love guys that use world trade. Thx for the credits---your in a pod. LOL


Tue May 26, 2015 10:32 pm
Profile ICQ
Commander

Joined: Thu Oct 17, 2002 2:00 am
Posts: 1158
Unread post Re: Haggle In world trade twx 2.05
Haven't had any issues since I've started using Vid's Script. I undid what I did to cause this error in the first place and Vid's script hands down gets you more money than the reg TWX world trade. Hope that helps! Thanks again Vid appreciate it!


Comet


Sun May 31, 2015 7:02 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 5 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.