|
Troublemag Wanderer
Joined: 14 Jul 2004 Posts: 83
|
Posted: Fri Sep 28, 2007 5:16 am
[2.03] Using (%s) to capture spaces not working |
Code: |
Pattern: (*)(%s)(%d) A,(%s)(%d) E,(%s)(%d) F,(%s)(%d) S,(%s)(%d) W,(%s)(%d) End.
Body of Trigger:
#var weavename %1
#var aircost %3
#var earthcost %5
#var firecost %7
#var spiritcost %9
#var watercost %11
#var endcost %13
#if ((@sphereair>=@aircost)&&(@sphereearth>=@earthcost)&&(@spherefire>=@firecost)&&(@spherespirit>=@spiritcost)&&(@spherewater>=@watercost)) {#sub "@weavename @aircost<color white> A</color>,%4@earthcost<color darkgoldenrod> E</color>,%6@firecost<color red> F</color>,%8@spiritcost<color yellow> S</color>,%10@watercost<color blue> W,</color>%12@endcost <color green>End.</color> <color Red>Yes</color>"} {#sub "@weavename @aircost<color white> A</color>,%4@earthcost<color darkgoldenrod> E</color>,%6@firecost<color red> F</color>,%8@spiritcost<color yellow> S</color>,%10@watercost<color blue> W,</color>%12@endcost <color green>End.</color> <color Red>No</color>"} |
In 1.34, the %2, %4, %6, etc would output the spacing to match the original pattern captured in the trigger. In 2.03, no spaces at all are output where they are placed.
output with triggers off:
Code: |
blade of flame 0 A, 40 E, 90 F, 0 S, 0 W, 30 End.
blindness 30 A, 0 E, 0 F, 15 S, 0 W, 30 End.
blizzard 60 A, 0 E, 0 F, 0 S, 80 W, 85 End.
call lightning 80 A, 0 E, 50 F, 30 S, 0 W, 85 End.
calm 0 A, 0 E, 0 F, 75 S, 0 W, 30 End.
|
Output with triggers on in 2.03:
Code: |
blade of flame 0 A,40 E,90 F,0 S,0 W,30 End. No
blindness 30 A,0 E,0 F,15 S,0 W,30 End. Yes
blizzard 60 A,0 E,0 F,0 S,80 W,85 End. No
call lightning 80 A,0 E,50 F,30 S,0 W,85 End. Yes
|
|
|
_________________ CMUDPro 3.22 |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Fri Sep 28, 2007 8:16 am |
The behavior you described does occur. I'm not sure if it's a bug or not, but it's a result of using quotes(") with you #sub. If you use curly braces instead '{' (which I believe is the correct way to get variables evaluated), it works fine. As a matter of fact, the quote is supposed to treat everything as a literal so I'm surprised the variables are being evaluated at all. At any rate this is what you want.
Code: |
#if ((@sphereair>=@aircost)&&(@sphereearth>=@earthcost)&&(@spherefire>=@firecost)&&(@spherespirit>=@spiritcost)&&(@spherewater>=@watercost)) {
#sub {@weavename @aircost<color white> A</color>,%4@earthcost<color darkgoldenrod> E</color>,%6@firecost<color red> F</color>,%8@spiritcost<color yellow> S</color>,%10@watercost<color blue> W,</color>%12@endcost <color green>End.</color> <color Red>Yes</color>}
} {
#sub {@weavename @aircost<color white> A</color>,%4@earthcost<color darkgoldenrod> E</color>,%6@firecost<color red> F</color>,%8@spiritcost<color yellow> S</color>,%10@watercost<color blue> W,</color>%12@endcost <color green>End.</color> <color Red>No</color>}
} |
|
|
_________________ Asati di tempari! |
|
|
|
Troublemag Wanderer
Joined: 14 Jul 2004 Posts: 83
|
Posted: Fri Sep 28, 2007 3:01 pm |
I made the suggested change and the output did generate correctly for about 10 lines. After that, it generated a series of error messages including one about data being out of range (sorry, didn't think it would totally break my cmud so I didn't submit it) followed by 2 memory read violations. Continuing application through those got about 8 or 10 more lines out of the game before it caused my CMUD to stop. The memory did not max out (processor was around 12% at the time and the CMUD processes were both at 0), but the game would not allow me to do anything. I received no output from the game, could not click on any button, could not enter any text on the command line. I closed the process, re-opened CMUD, attempted to connect to the game again and within 1 second of connection, CMUD stopped again. Not even the ticktimer is showing any activity.
I closed the process again, re-opened CMUD, opened the session offline and changed the curly brackets back to quotes, reconnected and CMUD stopped again.
I attempted to open a new session that uses the same pkg file and received a "Canvas does not allow drawing error." That was the first error that had generated since the initial change and once I submitted the bug report and continued the app, CMUD stopped again. |
|
_________________ CMUDPro 3.22 |
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Fri Sep 28, 2007 3:36 pm |
If you've never submitted a particular error before and you believe it is not just an error in your script, you should always submit it.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Sep 28, 2007 4:30 pm |
Never, ever press the continue button when a crash happens. Okay, that's an exaggeration - in the past, there've been things that shouldn't have caused the crash dialogue to come up, but it did anyway - but all the things that're supposed to make the crash dialogue appear indicate some kind of memory corruption. CMUD can't normally recover from that kind of error, and that's why you're seeing all that weird behaviour when you continue.
Since CMUD's memory has been corrupted, it can cause all kinds of things to go wrong - try recreating this setting that's not working in the untitled session and using #show to run text through it. It's possible that it could be corruption in your package file, possibly caused by CMUD saving (or attempting to save) corrupt data after a crash. |
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Fri Sep 28, 2007 8:04 pm |
Fang Xianfu wrote: |
Never, ever press the continue button when a crash happens. Okay, that's an exaggeration - in the past, there've been things that shouldn't have caused the crash dialogue to come up, but it did anyway - but all the things that're supposed to make the crash dialogue appear indicate some kind of memory corruption. CMUD can't normally recover from that kind of error, and that's why you're seeing all that weird behaviour when you continue.
Since CMUD's memory has been corrupted, it can cause all kinds of things to go wrong - try recreating this setting that's not working in the untitled session and using #show to run text through it. It's possible that it could be corruption in your package file, possibly caused by CMUD saving (or attempting to save) corrupt data after a crash. |
I think you're overstating this. The memory probably isn't corrupted - but it may be in an inconsistent state. Same goes for the database if this in-memory data gets saved. And this is excluding parse errors that occur from the command line - that will not cause any problems and you can continue using CMUD. Having said that, it is definitely wise to close CMUD after after it produces a stack trace. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Sep 28, 2007 8:52 pm |
Also, certainly never *Send* additional bug reports after you have already received a crash. Definitely send the first crash dump, but once CMUD has crashed once, sending additional crash dumps is usually pointless and just fills by crash dump database with unless reports.
The rule of thumb that I use is that I will click "Continue" if I'm in the middle of something on the MUD and want to try and get to a safer area. But the first chance that I can get, I will then exit CMUD and restart. |
|
|
|
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Fri Sep 28, 2007 9:38 pm |
Zugg
Heh, and what to do if first bur report sending fails (unable to send bug report)? I usually send it again, it succeed on second try. Am I wrong? Can a bug report be sent partially or it like transaction, everything or nothing?
For me there is only 1 type of error after which I continue to run CMUD - help window index error (out of range). |
|
_________________ My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Sep 28, 2007 9:43 pm |
If it fails to send save it to a file and post it. The file it saves to will be appended so make sure you grab the last report in the file, also remove any private information when posting. Be sure to use code tags as well.
Last time I tested it there was still a known bug with sending feedback and bug reports when using an HTTP proxy configured through the Internet Connection settings. Disabling that proxy configuration, sending the report, then reenabling works for this particular bug. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Fri Sep 28, 2007 9:47 pm |
If it failed on first try, it works from second try. And I'm not sit behind any proxys. Just 50/50: may send on first try, or may only on second one.
|
|
_________________ My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads |
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Fri Sep 28, 2007 10:46 pm |
If it fails to send check out bugreport.txt in your CMUD folder for the stack trace.
|
|
|
|
Troublemag Wanderer
Joined: 14 Jul 2004 Posts: 83
|
Posted: Sat Sep 29, 2007 1:49 am |
Update:
I had to work today so I couldn't get back to this until this evening. I took the following steps:
1. Uninstalled CMUD.
2. Deleted all left over files, including those in the My Games directory
3. Re-installed CMUD
4. Deleted all extraneous MUD sessions.
5. Created new session for the mud I play on
6. Copied a backed-up version of my original pkg file (It was backed up to a flash drive a month ago and the flash drive wasn't plugged in at the time of the borking)
7. Opened session
8. Made the changes originally suggested (changing " to { } in the one trigger)
9. Caused trigger to fire
Result - output is formatted correctly, no crashing. I cannot replicate the original crash at this time. If, however, it happens again, rest assured that a crash report will be sent.
thanks |
|
|
|
|
|
|
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
|
|