|
Kanolds Beginner
Joined: 27 Sep 2002 Posts: 14 Location: Sweden
|
Posted: Wed Jan 22, 2003 1:49 pm
Access violation error |
Access violation at address 0064F475 in module 'Zmud.exe'. Read of address 00000008
click 'ok' on that error message and this comes up:
Error parsing: P
Message: Access violation at address 0064F475 in module 'Zmud.exe'. Read of address 00000008
What ive been doing is the following, i got a Database with alot of afflictions in it, every post got 18 fields, field 1 is the name of the affliction, field 2-16 is the syntax that can be for that affliction, then 17 is a boolean to check if you got it or not, then the last field, 18 is what you do to cure this affliction.
now this error message comes up when i use the %db(3,syntax1) command in the pattern box, then in the value field i got, #exec %db(3,cure) and when i get the affliction, i get the error message. Cant i do like this (please say i can, since ive put down several hours in making the database and the triggers (got over 70 posts and over 1000 triggers)) Would be grateful if anyone could solve this for me since its really annoying. I am currently working with zMUD 6.16 |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Jan 22, 2003 2:16 pm |
Functions are not executed in the pattern of a trigger. You can't use them for that. Try explaining in more detail what you want to do and how the information is structured with some examples, and we may find another method of doing it.
Kjata |
|
|
|
Kanolds Beginner
Joined: 27 Sep 2002 Posts: 14 Location: Sweden
|
Posted: Wed Jan 22, 2003 2:45 pm |
i got a database
ex.
post #3
name: paralysis
syntax1:a prickly stinging sensation spreads through your body
syntax2:You limbs stiffen up
syntax3:The bees sting you into paralysis
and so on, up to #15
cure:ebl
gotit:0 (boolean)
then i got a trigger,
pattern: %db(3,syntax1)
value: #exec %db(3,cure)
then,
pattern: %db(3,syntax2)
value: #exec %db(3,cure)
and so on, for all the 15 syntaxes.
which means, 15 triggers for every post in the database. they are all done and it works, except that i get the exception error every time the trigger triggers. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Jan 22, 2003 4:25 pm |
Make an alias that creates these triggers with the actual text from the datbase hardcoded in the pattern. Example:
#ALIAS creatParTrigs {#LOOP 15 {#EXEC {%concat("#TRIGGER {", %db(3, syntax%i), "} {#EXEC %db(3, cure)}")))}}}
Running this alias will create the triggers with the actual message sent from the MUD as a pattern instead of %db. Whenever you update one of these messages in the database, run the alias again to update the triggers.
Kjata |
|
|
|
Kanolds Beginner
Joined: 27 Sep 2002 Posts: 14 Location: Sweden
|
Posted: Wed Jan 22, 2003 6:55 pm |
Yes, i guess that would work just fine, but the thing is that i really want it in the database, because if id write it in the trigger anyway, why bother using a database at all? im just trying to get this to work, and at the same time doing something useful with my time. But thanks anyway Kjata, if nothing else works, i guess ill have to do like that.
But is the error message because of what i have is written wrong or because of something else i will never understand?
from what i understand, this should be possible. |
|
|
|
Kanolds Beginner
Joined: 27 Sep 2002 Posts: 14 Location: Sweden
|
Posted: Wed Jan 22, 2003 7:26 pm |
http://www.kanolds.i8.com/database.html
picture,
1: a view over the database
2: what happends when i type in one of the syntaxes that should be triggered
3: after i close down the first error message
4: a look at it after ive clicked down both error messages
5: a picture of the triggers i got, abit over 1000 triggers done there.
the text you can see there 'hej hej hej' is what i typed in the alias ebl, which the trigger triggered, everything works, except that i get the error messages, would be VERY grateful for any answer that could solve this. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Jan 22, 2003 11:15 pm |
I just tested with a database I have and the error doesn't come up. Of course, this is just me, I cannot test with your database.
Make sure that you database doesn't contain any fields of type Room or Zone. It doesn't sound like this may be your problem, but check it anyway.
Also, try creating one of the triggers manually. Example:
#TRIGGER {Your limbs stiffen and lock} {ebl}
and disable the other one. Try testing with this trigger and see if the error comes up. If it doesn't, then change the trigger to:
#TRIGGER {Your limbs stiffen and lock} {#EXEC %db(3, cure)}
Test with this trigger again. Finally, if it still works fine until now, change the trigger to be just like the other one (but still keep the original disabled, although you might have to move it somewhere else):
#TRIGGER {%db(3, syntax10)} {#EXEC %db(3, cure)}
and test once more.
If everything fails, you might try following the steps described in the Migration Guide just in case your settings file is corrupted.
Kjata |
|
|
|
Kanolds Beginner
Joined: 27 Sep 2002 Posts: 14 Location: Sweden
|
Posted: Thu Jan 23, 2003 10:43 am |
Well, after a few hours of trying this and trying that, i realized that the database isnt the problem, it seems to be zMUD having memory problems. If i create a blank settings system and only make one trigger(pattern: %db(3,syntax1) and value: %db(3,cure). (note that #exec was taken away, since it seems to work without it now)) and then everything works just fine, i add another trigger, and still everything works, then i decide that perhaps its the right time of the day now, and that it all will work, so i import all the 1005 triggers i got in a text file, and BOOM, it stops working again, not only that, but everything i do stops working, from aliases, to macros, to triggers, nothing works. i have to restart the application and then if i load it up with the same settings system it still dont work, so i have to make a new clean one again, and then it works again, perhaps it can be that i have to many triggers, well, to be honest i dont have an idea what might be wrong, just trying out thoughts. and Thanks once again Kjata, it was your post that made me try it all again, even that it seemed hopeless
Well, i better give out some computer info if that can help:
Intel P3 1000Mhz
512 Mb ram
Running Windows XP and got zMud 6.16 (it dont work in 6.40 either, tried)
if you would like any other info, or anything, mail me and ill get back to you asap [url]kanolds_snusa@hotmail.com[/url] |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Jan 23, 2003 1:48 pm |
Although it might not sound like the most entertaining thing in the world, you are going to have to start importing your triggers one by one until you import the one that makes it all fail.
Kjata |
|
|
|
Kanolds Beginner
Joined: 27 Sep 2002 Posts: 14 Location: Sweden
|
Posted: Thu Jan 23, 2003 10:06 pm |
Well, we made 1 trigger in Zmud, exported that, and then in notepad, we copied it and only changed the value (from 3 to 4 then from 4 to 5 and so on) so we made all the 1005 triggers that way. but i guess i could make an easy script that from one trigger makes every else, inside Zmud instead of using Notepad and doing it. Perhaps that will solve it all, but going through all the 1005 triggers manually, well, even if it could solve it, i dont think i will ever actually do that, just dont have enough time, doing them all from the beginning goes faster, i think. But if anyone, or You Kjata, think of something else that might be the error, i would really appreciate to hear what you think. This is a whole new world, and im learning as i go, but help is always appreciated.
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Jan 23, 2003 10:18 pm |
If when you imported the rest of the triggers, the error started appearing again, then the most likely situation is that one of them is to blame, not all. If you want to just start from scratch and recreate them again, you can do that too. I understand that it would be a lot of work to find which of the triggers is causing the problem.
Kjata |
|
|
|
Kanolds Beginner
Joined: 27 Sep 2002 Posts: 14 Location: Sweden
|
Posted: Thu Jan 23, 2003 10:20 pm |
well, since i really dont care which one of them is causing the problem, and it goes alot faster to recreate them all, i guess ill have to get my brain working again and make this script, but the loop command dont seem to work in this case, is this wrong:
#loo 1,15 {#trigger {%db(3,syntax%{i})} {%db(3,cure)}}
that is for database post number 3, but still it would help me alot, just to get that to work. it is right, right? |
|
|
|
Kanolds Beginner
Joined: 27 Sep 2002 Posts: 14 Location: Sweden
|
Posted: Thu Jan 23, 2003 11:17 pm |
Ok, i give up this whole Database idea, but now i got all the triggers in the database, and want them out of there without having to type it, is there anyone that could put together a simple script that could do this?
there are 15 fields, named 'syntax1' to 'syntax15' and then a field called 'cure' i want 15 triggers, one for every syntax, and then the 'cure' in every one of them. and i would like to have the triggers separated into classes, like for instance, post #3, has a field called 'affliction' which is the name of the affliction, could the 15 triggers that are taken from #3 be put in a class folder that got the same name as the 'affliction' field? well, anyhow, i think that Databases can be a blast if i could get them to work, but i also realized that having a status window that gets info from it, well, dont work, it dont updates until i manually open the db window, and that sucks. so, to sum it all together, 15 triggers for every post in the database, and the 15 triggers for post 1, should be placed in a class folder named the same as post number one's affliction field. well, if this is possible, i would be one happy guy
*last minute adding* im to tired for all this, send me a mail or something if you cant understand this |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Fri Jan 24, 2003 1:15 am |
Here's the loop I originally posted, modified to organize the triggers by class:
#ALIAS createTrigs {#LOOP 15 {#EXEC {%concat("#TRIGGER {", %db(%1, syntax%i), "} {#EXEC %db(%1, cure)} ", %db(%1, affliction))))}}}
Call the alias with the number of the record in the database as a parameter.
Kjata |
|
|
|
Kanolds Beginner
Joined: 27 Sep 2002 Posts: 14 Location: Sweden
|
Posted: Fri Jan 24, 2003 1:21 am |
WOW, thanks alot, it works just fine, but well, one last thing though, since the database obviously isnt there for this purpose, im giving up the whole idea before my hair turns gray and i pull it out in despair, and your alias works just great, now just one last thing as i said, im not gonna use the database at all, so do you think you could change the alias once again to put the cure from the db into the trigger itself, instead of the trigger just pointing to the db, well, THANKS! You are simply the best!
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Fri Jan 24, 2003 3:23 am |
Yup, no problem:
#ALIAS createTrigs {#LOOP 15 {#EXEC {%concat("#TRIGGER {", %db(%1, syntax%i), "} {", %db(%1, cure), "} ", %db(%1, affliction))))}}}
Kjata |
|
|
|
Kanolds Beginner
Joined: 27 Sep 2002 Posts: 14 Location: Sweden
|
Posted: Fri Jan 24, 2003 12:13 pm |
well, i havent tried this yet, but it comes from you, so im 100% sure it works.. Thanks once again!
|
|
|
|
|
|
|
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
|
|