|
Atreides_096 Wanderer
Joined: 21 Jan 2005 Posts: 99 Location: Solvang, CA
|
Posted: Thu Oct 26, 2006 9:31 am
Trigger not importing properly |
I've got a trigger that isn't re-importing properly after export, and I cannot find the reason for it. It checks out in pretty print, and I've gone over it 3 times (as well as trying things like exporting in pieces, remvoing/re-writing pieces of code, removing comments, etc etc etc). Anyway, the trigger is:
Code: |
#T- "GQRewardTracking"
ingquest=1
#if %db( @GQTracker_DB, LastGQAdded)="No" {
#addkey GQTracker_DB LastGQAdded Yes
#0 {-------------------- Time Tracking ---------------------}
#addkey GQTracker_DB GQFinishTime %secs
#addkey GQTracker_DB LastGQTime {@TrackersSecsTimeFormatting(%db(@GQTracker_DB, GQStartTime),%db(@GQTracker_DB, GQFinishTime))}
#if %db( @GQTracker_DB, LastGQTime)>0 {
#if %db( @GQTracker_DB, LastGQTime)<%db( @GQTracker_DB, BestTimeSinceReset) {#yesno "A new recent time record has been set. Record this time?" {
Record it:%null
#addkey GQTracker_DB BestTimeSinceReset {%db( @GQTracker_DB, LastGQTime)}
} {Ignore it:%null}}
#if %db( @GQTracker_DB, LastGQTime)<%db( @GQTracker_DB, BestTimeAllTime) {#yesno "A new all-time record has been set. Record this time?" {
Record it:%null
#addkey GQTracker_DB BestTimeAllTime {%db( @GQTracker_DB, LastGQTime)}
} {Ignore it:%null}}
}
#0 {-------------------- GQ Tracking ----------------------}
#if {%1=%char or %1=%db( @GQTracker_DB, CharName)} {
#addkey GQTracker_DB GQWinsSinceReset {%eval( %int( %db( @GQTRacker_DB, GQWinsSinceReset)) + 1)}
#addkey GQTracker_DB GQWinsAllTime {%eval( %int( %db( @GQTRacker_DB, GQWinsAllTime)) + 1)}
}
#addkey GQTracker_DB MobsKilledSinceReset {%eval( %int( %db( @GQTRacker_DB, MobsKilledSinceReset))+%db( @GQTRacker_DB, MobsKilledCurrentGQ))}
#addkey GQTracker_DB MobsKilledAllTime {%eval( %int( %db( @GQTRacker_DB, MobsKilledAllTime))+%db( @GQTRacker_DB, MobsKilledCurrentGQ))}
#addkey GQTracker_DB QpsCurrentGQ {%eval( %int( %db( @GQTRacker_DB, QpsCurrentGQ))+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))}
#addkey GQTracker_DB QpsSinceReset {%eval( %int( %db( @GQTRacker_DB, QpsSinceReset))+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))}
#addkey GQTracker_DB QpsAllTime {%eval( %int( %db( @GQTRacker_DB, QpsAllTime))+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))
}
#0 {-------------------- Trackers Reporting ----------------}
#if {%1=%char or %1=%db( @GQTracker_DB, CharName)} {
#addkey TrackersEarned_DB GQsToday {%eval( %db( @TrackersEarned_DB, GQsToday)+1)}
#addkey TrackersEarned_DB GQsThisWeek {%eval( %db( @TrackersEarned_DB, GQsThisWeek)+1)}
#addkey TrackersEarned_DB GQsThisMonth {%eval( %db( @TrackersEarned_DB, GQsThisMonth)+1)}
#addkey TrackersEarned_DB GQsThisMort {%eval( %db( @TrackersEarned_DB, GQsThisMort)+1)}
#addkey TrackersEarned_DB GQsThisTier {%eval( %db( @TrackersEarned_DB, GQsThisTier)+1)}
}
#addkey TrackersEarned_DB QpsToday {%eval( %db( @TrackersEarned_DB, QpsToday)+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))}
#addkey TrackersEarned_DB QpsThisWeek {%eval( %db( @TrackersEarned_DB, QpsThisWeek)+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))}
#addkey TrackersEarned_DB QpsThisMonth {%eval( %db( @TrackersEarned_DB, QpsThisMonth)+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))}
#addkey TrackersEarned_DB QpsThisMort {%eval( %db( @TrackersEarned_DB, QpsThisMort)+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))}
#addkey TrackersEarned_DB QpsThisTier {%eval( %db( @TrackersEarned_DB, QpsThisTier)+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))}
lgq
} |
When I attempt to import, the trigger goes in as
and I get ";lgq}}" on my screen. Additionally, other triggers begin to stop functioning correctly when I import, triggers that should have no conflict with this script. Does anyone have any ideas? Thanks a lot in advance :) |
|
|
|
Atreides_096 Wanderer
Joined: 21 Jan 2005 Posts: 99 Location: Solvang, CA
|
Posted: Thu Oct 26, 2006 9:34 am |
PS: The exported chunk looks like:
Code: |
#TRIGGER {^Global Quest: The global quest has been won by (%w).$} {#T- "GQRewardTracking";ingquest=1;#if %db( @GQTracker_DB, LastGQAdded)="No" {#addkey GQTracker_DB LastGQAdded Yes;#0 {-------------------- Time Tracking ---------------------};#addkey GQTracker_DB GQFinishTime %secs;#addkey GQTracker_DB LastGQTime {@TrackersSecsTimeFormatting(%db(@GQTracker_DB, GQStartTime),%db(@GQTracker_DB, GQFinishTime))};#if %db( @GQTracker_DB, LastGQTime)>0 {#if %db( @GQTracker_DB, LastGQTime)<%db( @GQTracker_DB, BestTimeSinceReset) {#yesno "A new recent time record has been set. Record this time?" {Record it:%null;#addkey GQTracker_DB BestTimeSinceReset {%db( @GQTracker_DB, LastGQTime)}} {Ignore it:%null}};#if %db( @GQTracker_DB, LastGQTime)<%db( @GQTracker_DB, BestTimeAllTime) {#yesno "A new all-time record has been set. Record this time?" {Record it:%null;#addkey GQTracker_DB BestTimeAllTime {%db( @GQTracker_DB, LastGQTime)}} {Ignore it:%null}}};#0 {-------------------- GQ Tracking ----------------------};#if {%1=%char or %1=%db( @GQTracker_DB, CharName)} {#ADDKEY GQTRacker_DB GQWinsSinceReset {%eval( %int( %db( @GQTRacker_DB, GQWinsSinceReset)) + 1)};#ADDKEY GQTRacker_DB GQWinsAllTime {%eval( %int( %db( @GQTRacker_DB, GQWinsAllTime)) + 1)}};#addkey GQTRacker_DB MobsKilledSinceReset {%eval( %int( %db( @GQTRacker_DB, MobsKilledSinceReset))+%db( @GQTRacker_DB, MobsKilledCurrentGQ))};#addkey GQTRacker_DB MobsKilledAllTime {%eval( %int( %db( @GQTRacker_DB, MobsKilledAllTime))+%db( @GQTRacker_DB, MobsKilledCurrentGQ))};#addkey GQTRacker_DB QpsCurrentGQ {%eval( %int( %db( @GQTRacker_DB, QpsCurrentGQ))+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))};#addkey GQTRacker_DB QpsSinceReset {%eval( %int( %db( @GQTRacker_DB, QpsSinceReset))+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))};#addkey GQTRacker_DB QpsAllTime {%eval( %int( %db( @GQTRacker_DB, QpsAllTime))+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))
};#0 {-------------------- Trackers Reporting ----------------};#if {%1=%char or %1=%db( @GQTracker_DB, CharName)} {#addkey TrackersEarned_DB GQsToday {%eval( %db( @TrackersEarned_DB, GQsToday)+1)};#addkey TrackersEarned_DB GQsThisWeek {%eval( %db( @TrackersEarned_DB, GQsThisWeek)+1)};#addkey TrackersEarned_DB GQsThisMonth {%eval( %db( @TrackersEarned_DB, GQsThisMonth)+1)};#addkey TrackersEarned_DB GQsThisMort {%eval( %db( @TrackersEarned_DB, GQsThisMort)+1)};#addkey TrackersEarned_DB GQsThisTier {%eval( %db( @TrackersEarned_DB, GQsThisTier)+1)}};#addkey TrackersEarned_DB QpsToday {%eval( %db( @TrackersEarned_DB, QpsToday)+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))};#addkey TrackersEarned_DB QpsThisWeek {%eval( %db( @TrackersEarned_DB, QpsThisWeek)+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))};#addkey TrackersEarned_DB QpsThisMonth {%eval( %db( @TrackersEarned_DB, QpsThisMonth)+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))};#addkey TrackersEarned_DB QpsThisMort {%eval( %db( @TrackersEarned_DB, QpsThisMort)+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))};#addkey TrackersEarned_DB QpsThisTier {%eval( %db( @TrackersEarned_DB, QpsThisTier)+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))};lgq}} |
|
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Oct 26, 2006 1:40 pm |
well, I can confirm this. (as if Atreides needed me to)
Importing does as he said, yet pretty print shows no errors. |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Oct 26, 2006 1:48 pm |
Interesting note:
On importing this trigger 3 variables are being created:
#VAR GQTracker_DB {GQFinishTime%secsLastGQTime@TrackersSecsTimeFormatting(%db(@GQTracker_DB, GQStartTime),%db(@GQTracker_DB, GQFinishTime))MobsKilledSinceReset%eval( %int( %db( @GQTRacker_DB, MobsKilledSinceReset))+%db( @GQTRacker_DB, MobsKilledCurrentGQ))MobsKilledAllTime%eval( %int( %db( @GQTRacker_DB, MobsKilledAllTime))+%db( @GQTRacker_DB, MobsKilledCurrentGQ))QpsCurrentGQ%eval( %int( %db( @GQTRacker_DB, QpsCurrentGQ))+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))QpsSinceReset%eval( %int( %db( @GQTRacker_DB, QpsSinceReset))+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))QpsAllTime%eval( %int( %db( @GQTRacker_DB, QpsAllTime))+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))}
#VAR ingquest {1}
#VAR TrackersEarned_DB {QpsToday%eval( %db( @TrackersEarned_DB, QpsToday)+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))QpsThisWeek%eval( %db( @TrackersEarned_DB, QpsThisWeek)+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))QpsThisMonth%eval( %db( @TrackersEarned_DB, QpsThisMonth)+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))QpsThisMort%eval( %db( @TrackersEarned_DB, QpsThisMort)+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))QpsThisTier%eval( %db( @TrackersEarned_DB, QpsThisTier)+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))}
So, i think that the part before #addkey GQTracker_DB GQFinishTime %secs is the problem.
Code: |
#T- "GQRewardTracking"
ingquest=1
#if %db( @GQTracker_DB, LastGQAdded)="No" {
#addkey GQTracker_DB LastGQAdded Yes
# 0 {-------------------- Time Tracking ---------------------} |
EDIT: ...Wait....# 0 not #0?....
EDIT2: Never mind, on Varmels site for some reason #0 becomes # 0. That's where I pretty printed the code from.
EDIT3: Interesting, but I took the pretty printed code from Varmels, changed every # 0 to #0 and imported it perfectly fine.... |
|
|
|
Atreides_096 Wanderer
Joined: 21 Jan 2005 Posts: 99 Location: Solvang, CA
|
Posted: Thu Oct 26, 2006 9:07 pm |
I tried importing 10-15 times.. in pre-existing settings files, as well as fresh (empty) ones. I also tried after zmud restarts, etc.. I got the same problem every time. Does anyone have any ideas then why Vitae could import and I can't?
|
|
|
|
Atreides_096 Wanderer
Joined: 21 Jan 2005 Posts: 99 Location: Solvang, CA
|
Posted: Fri Oct 27, 2006 4:52 am |
If anyone cares.. I finally found the problem... rather odd, imo. It was in the last line of the "GQ Tracking" section:
Code: |
#addkey GQTracker_DB QpsAllTime {%eval( %int( %db( @GQTRacker_DB, QpsAllTime))+(%db( @GQTRacker_DB, MobsKilledCurrentGQ)*3))
} |
If you notice, the } is down one line. When exporting, it was sending an actual carriage return into the export file, and then when I'd try to import, it would import the top half of the trigger and then break off in the middle... *shrug* |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Fri Oct 27, 2006 4:52 pm |
Now the question is
1) how the heck did that happen
2) why the heck wasn't it showing on the pretty print in zmud (not Varmel's site)
As for #2, I'd just chalk it up to the same weirdness that reports a script as not being valid when it is. |
|
|
|
|
|
|
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
|
|