celahir2005-02-27 19:08:37
On Zmud I keep getting these pointer errors normally in battle or when theres alot of Spam. When this happens I normally end up having to close zmud using ctrl alt delete as everytime I click on the error box to close it another one comes up to replace it.
They normally come up complaining about 2 main things being my cure alias which is simply
#IF (@afflictions.affliction) {lcp_cureaffliction}
For each affliction each of the alias' go into temporary triggers and eating herbs, vials etc.
The second complaint is normally from my prompt trigger which is:
#TRIGGER {(%d)h, (%d)m, (%d)e, (%d)p (*)-} {
 #IF (%pos( x, %5)) {Balance=0} {Balance=1}
 #IF (%pos( e, %5)) {equilibrium=0} {equilibrium=1}
 #IF (!@meditation and !@afflictions.paralysis and @awake and !@afflictions.stunned) {
  #IF (%pos( p, %5) and !@pronecure) {
   afflict prone
   lcp_cure
   #ALARM +2 {#var pronecure 0}
   #var pronecure 1
   } {unafflict prone}
  #IF (%pos( k, %5) and !@deffing) {lcp_ondef alertness} {lcp_defdown kafe}
  }
 health_current=%1
 mana_current=%2
 ego_current=%3
 power=%4
 lcp_siphealth
 lcp_sipmana
 lcp_sparkle
 #class diagnose 0
 lcp_absolvecheck
 } "" {nocr|prompt}
Alot of my other many alias's often come up to but these are the main complaints.
If you check them you'll see that they're fine and have no syntax errors or anything. Please help as this is really annoying.

They normally come up complaining about 2 main things being my cure alias which is simply
CODE
#IF (@afflictions.affliction) {lcp_cureaffliction}
For each affliction each of the alias' go into temporary triggers and eating herbs, vials etc.
The second complaint is normally from my prompt trigger which is:
CODE
#TRIGGER {(%d)h, (%d)m, (%d)e, (%d)p (*)-} {
 #IF (%pos( x, %5)) {Balance=0} {Balance=1}
 #IF (%pos( e, %5)) {equilibrium=0} {equilibrium=1}
 #IF (!@meditation and !@afflictions.paralysis and @awake and !@afflictions.stunned) {
  #IF (%pos( p, %5) and !@pronecure) {
   afflict prone
   lcp_cure
   #ALARM +2 {#var pronecure 0}
   #var pronecure 1
   } {unafflict prone}
  #IF (%pos( k, %5) and !@deffing) {lcp_ondef alertness} {lcp_defdown kafe}
  }
 health_current=%1
 mana_current=%2
 ego_current=%3
 power=%4
 lcp_siphealth
 lcp_sipmana
 lcp_sparkle
 #class diagnose 0
 lcp_absolvecheck
 } "" {nocr|prompt}
Alot of my other many alias's often come up to but these are the main complaints.
If you check them you'll see that they're fine and have no syntax errors or anything. Please help as this is really annoying.

celahir2005-02-27 19:20:46
Ok i managed to get some of the error comments:
There is also some stuff about pointer errors. but i couldn't get that.
QUOTE
Access Volations at address 004231d3 in module 'Zmud.exe'. Read of address 00000008
QUOTE
Error Parsing Command
Acces violation at address 00402486 in module 'Zmud.exe'. Read of address 000000FC
#VAR exits %additem("southeast", @exits)
Acces violation at address 00402486 in module 'Zmud.exe'. Read of address 000000FC
#VAR exits %additem("southeast", @exits)
There is also some stuff about pointer errors. but i couldn't get that.
Unknown2005-02-27 20:00:43
Maybe you just have a corrupted settings file? That's what I hear on the Zuggsoft forums most often when someone has a problem similar to this one. I don't see anything glaringly wrong with the scripts as you've posted them.
celahir2005-02-28 14:09:10
Ok then so how do i fix this.
celahir2005-02-28 14:12:13
QUOTE
I don't see anything glaringly wrong with the scripts as you've posted them.
What do you see wrong with them then?
*peer*
Unknown2005-02-28 16:11:30
I'd suggest posting your errors on the Zuggsoft forums for the real zMUD experts (particularly Zugg himself, if you're lucky) as this doesn't seem to be a script question.
I don't really see anything wrong with the script, except that it's not the way I did the LCP.
(Doesn't make it "wrong," of course.)
I don't really see anything wrong with the script, except that it's not the way I did the LCP.

celahir2005-02-28 21:14:25
Oky I'll try that
Also .. dont you mean ACP.. unless you've made an LCP..... have you?
Also .. dont you mean ACP.. unless you've made an LCP..... have you?
Unknown2005-02-28 21:31:49
I mean LCP. I've made one, but it's not open source. It's available for 30 credits, at the present time. Working on porting it to MUSHclient, but it'll take me quite a while on that yet.
Nevyn2005-03-18 13:43:41
I had similar problems to this in my original system on Achaea.
What is happening is that the scripts are getting overloaded by the flood of prompts.
This means that you get conflicts on memory access, which manifest as the problems you are seeing.
The script you have in your prompt is just taking way to long to execute given the number of prompts you are receiving per second.
I fixed this issue in three different ways.
Solution 1: wrap your whole prompt script in an if statement that compares the current time with the time you last got into the body of the if statement.. if the difference is more than say 250 (1/4 of a second) then enter the body and record the current time. This really speeds things up and stops that issue where you type and don't see anything when you get spammed aswell.
The bad thing about this is that your system only does something every 1/4 of a second.
Solution 2: move your prompt script into a plugin. This is the ultra solution, and requires a lot of effort.
Solution 3: Do less in your prompt or reorganise it to evaluate faster. for instance %pos is a fairly slow function you may want to look at =~ instead. and where you have an if statement such as.
#IF (%pos( p, %5) and !@pronecure) {
...
}
recode it as
#IF (!@pronecure) {
#IF (%5 =~ "p") {
...
}
}
I am fairly sure that AND is not a short circuit operator, so this change should mean the expensive operation only hapens if the cheep one is evaluated to true. If I am wrong and it is short cirtuit, the following will speed things up a litle
#IF (!@pronecure AND %5 =~ "p") {
...
}
What is happening is that the scripts are getting overloaded by the flood of prompts.
This means that you get conflicts on memory access, which manifest as the problems you are seeing.
The script you have in your prompt is just taking way to long to execute given the number of prompts you are receiving per second.
I fixed this issue in three different ways.
Solution 1: wrap your whole prompt script in an if statement that compares the current time with the time you last got into the body of the if statement.. if the difference is more than say 250 (1/4 of a second) then enter the body and record the current time. This really speeds things up and stops that issue where you type and don't see anything when you get spammed aswell.
The bad thing about this is that your system only does something every 1/4 of a second.
Solution 2: move your prompt script into a plugin. This is the ultra solution, and requires a lot of effort.
Solution 3: Do less in your prompt or reorganise it to evaluate faster. for instance %pos is a fairly slow function you may want to look at =~ instead. and where you have an if statement such as.
#IF (%pos( p, %5) and !@pronecure) {
...
}
recode it as
#IF (!@pronecure) {
#IF (%5 =~ "p") {
...
}
}
I am fairly sure that AND is not a short circuit operator, so this change should mean the expensive operation only hapens if the cheep one is evaluated to true. If I am wrong and it is short cirtuit, the following will speed things up a litle
#IF (!@pronecure AND %5 =~ "p") {
...
}
Nevyn2005-03-18 14:56:29
The following is how to make it only go off every 1/4 second. Note you need to set last_run to the current time when you login. and if you are paranoid, you may want to put some checks in to take into account the midnight issue 
You can also of course tune the 250 milliseconds to be optimum for your connection and pc speed.
#TRIGGER {(%d)h, (%d)m, (%d)e, (%d)p (*)-} {
#IF ((%secs - @last_run) > 250) {
 #VAR last_run %secs
 #IF (%pos( x, %5)) {Balance=0} {Balance=1}
 #IF (%pos( e, %5)) {equilibrium=0} {equilibrium=1}
 #IF (!@meditation and !@afflictions.paralysis and @awake and !@afflictions.stunned) {
  #IF (%pos( p, %5) and !@pronecure) {
   afflict prone
   lcp_cure
   #ALARM +2 {#var pronecure 0}
   #var pronecure 1
   } {unafflict prone}
  #IF (%pos( k, %5) and !@deffing) {lcp_ondef alertness} {lcp_defdown kafe}
  }
 health_current=%1
 mana_current=%2
 ego_current=%3
 power=%4
 lcp_siphealth
 lcp_sipmana
 lcp_sparkle
 #class diagnose 0
 lcp_absolvecheck
 }
} "" {nocr|prompt}

You can also of course tune the 250 milliseconds to be optimum for your connection and pc speed.
CODE
#TRIGGER {(%d)h, (%d)m, (%d)e, (%d)p (*)-} {
#IF ((%secs - @last_run) > 250) {
 #VAR last_run %secs
 #IF (%pos( x, %5)) {Balance=0} {Balance=1}
 #IF (%pos( e, %5)) {equilibrium=0} {equilibrium=1}
 #IF (!@meditation and !@afflictions.paralysis and @awake and !@afflictions.stunned) {
  #IF (%pos( p, %5) and !@pronecure) {
   afflict prone
   lcp_cure
   #ALARM +2 {#var pronecure 0}
   #var pronecure 1
   } {unafflict prone}
  #IF (%pos( k, %5) and !@deffing) {lcp_ondef alertness} {lcp_defdown kafe}
  }
 health_current=%1
 mana_current=%2
 ego_current=%3
 power=%4
 lcp_siphealth
 lcp_sipmana
 lcp_sparkle
 #class diagnose 0
 lcp_absolvecheck
 }
} "" {nocr|prompt}
Unknown2005-03-18 15:26:08
A simple, but not always perfect, solution to the speedy prompt problem is to simply add a second state to the trigger with a timed wait.
It simply disables the prompt trigger for a half second every time it fires.
CODE
#TRIGGER {^(%d)h, (%d)m* ()} {blah blah}
#COND {} {} {wait|param=500}
#COND {} {} {wait|param=500}
It simply disables the prompt trigger for a half second every time it fires.
Raan2005-03-22 13:48:51
To fix corrupted settings, export to text, then destroy all the settings and import it. I get this error a lot also when I got non existant buttons or something (press ctrl-b instead of ctrl-v) or the like.
celahir2005-03-23 16:07:42
Ok this ULTRA solution how does that work? Sounds interesting and challenging
Nevyn2005-03-24 22:05:41
You need to have a development environement that understands COM like VB, Delphi, or C++.
You then purchase the plugin development kit from Zuggsoft, and design your plugin.
The way I designed mine was to add lots of new commands to zMud. So I have a #SET_BLIND and #CLEAR_BLIND command.
I also created a new builtin type function %process_prompt. Which returns a string containing all the commands I want to execute in that prompt based on what #SET and #CLEAR commands I invoked earlier (#SET_EQ #CLEAR_EQ are good examples)
This basically does the same as your normal zMud scripts but many many times faster. After switching over to a plugin. The evaluation time for my prompt dropped from 80 milliseconds down to less than 1 millisecond. In fact it was so fast zMud could not measure it and always told me it took 0 milliseconds

If you want to really get into it in depth drop me an email on jason@marsoft.demon.co.uk
Edit:
Could not resist showing you what the prompt trigger would look like if you adopted this way of doing things
#TRIGGER {^&%d{level_health}h, &%d{level_mana}m, &%d{level_ego}e, &%d{level_power}p, &%d{level_endurance}en, &%d{level_willpower}w &%w{prompt_flags}-} {
 #SET_CURRENT_HEALTH @level_health
 #SET_CURRENT_MANA @level_mana
 #SET_CURRENT_EGO @level_ego
 #SET_CURRENT_POWER @level_power
 #SET_CURRENT_ENDURANCE @level_endurance
 #SET_CURRENT_WILLPOWER @level_willpower
 #SET_PROMPT_FLAGS @prompt_flags
 #EXEC %process_prompt( )
} "" {nocr|prompt}
Note: This only uses zMud variables to drive guages and such for a funky UI
You then purchase the plugin development kit from Zuggsoft, and design your plugin.
The way I designed mine was to add lots of new commands to zMud. So I have a #SET_BLIND and #CLEAR_BLIND command.
I also created a new builtin type function %process_prompt. Which returns a string containing all the commands I want to execute in that prompt based on what #SET and #CLEAR commands I invoked earlier (#SET_EQ #CLEAR_EQ are good examples)
This basically does the same as your normal zMud scripts but many many times faster. After switching over to a plugin. The evaluation time for my prompt dropped from 80 milliseconds down to less than 1 millisecond. In fact it was so fast zMud could not measure it and always told me it took 0 milliseconds

If you want to really get into it in depth drop me an email on jason@marsoft.demon.co.uk
Edit:
Could not resist showing you what the prompt trigger would look like if you adopted this way of doing things
CODE
#TRIGGER {^&%d{level_health}h, &%d{level_mana}m, &%d{level_ego}e, &%d{level_power}p, &%d{level_endurance}en, &%d{level_willpower}w &%w{prompt_flags}-} {
 #SET_CURRENT_HEALTH @level_health
 #SET_CURRENT_MANA @level_mana
 #SET_CURRENT_EGO @level_ego
 #SET_CURRENT_POWER @level_power
 #SET_CURRENT_ENDURANCE @level_endurance
 #SET_CURRENT_WILLPOWER @level_willpower
 #SET_PROMPT_FLAGS @prompt_flags
 #EXEC %process_prompt( )
} "" {nocr|prompt}
Note: This only uses zMud variables to drive guages and such for a funky UI