|
Nayuko Novice
Joined: 17 Jun 2008 Posts: 41
|
Posted: Thu Feb 03, 2011 3:27 pm
Some changes in cmud 3.33 as a cause of some errors comparing to previous cmud's |
Hello,
as usually, I write when I have a problem. New cmud version, has had some changes connected to the same commands which we could find in previous versions of /zmud/cmud. Part of script I will show, was working great under zmud/cmud 2.37. After I installed new cmud 3.33, the script based on that part, cant work. Why ?
Code: |
dirline = %replace( @dirline, ".", " ");#VAR dirline {" " @dirline " "};#VAR VAktywneKierunki "";#LOOPDB @DBPrzyciski {#IF (%pos( %val, @dirline)) {#NOOP %btnenable( %key, 1);#ADDITEM VAktywneKierunki %val} {#NOOP %btnenable( %key, 0)}};#IF (%pos( "gora", @dirline)) {#NOOP %btnenable( G, 1);#ADDITEM VAktywneKierunki %val} {#IF (%pos( "gore", @dirline)) {#NOOP %btnenable( G, 1);#ADDITEM VAktywneKierunki %val} {#NOOP %btnenable( G, 0)}};#IF (%class( Lazik)==1) {lazik_idz};#OK;#T- allexits
|
Sincerely,
N. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu Feb 03, 2011 6:44 pm |
Other than some very poor coding practices, nothing jumps out at me that should break this code. Could you be a little more specific than "the script based on that part cant work"? What happens instead? What makes you think that the problem is in this part of the code? Where does the original value of @dirline come from? What code enables allexits? You've given us a piece of code and say "it doesn't work", but without a lot more detail, we really can't help.
|
|
|
|
Nayuko Novice
Joined: 17 Jun 2008 Posts: 41
|
Posted: Thu Feb 03, 2011 6:54 pm |
It should enable buttons or disable it. That part of script is a core of code which shows directions by buttons/arrows in other window. It doesn't work.
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu Feb 03, 2011 8:02 pm |
I'm sorry, "it doesn't work" does not give us enough information to figure this out. What makes you think that it is this piece of code that is not working, and not some other piece of code that keeps this from working? Have you checked whether @dirline and @DBPrzyciski have the right values? Have you made any changes to the code for the buttons? Have you checked whether the trigger this is in is actually firing? Do the buttons themselves work? Have you moved any of your code around between classes or modules? When you ask us to help you, you need to provide as much information as possible.
|
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Fri Feb 04, 2011 5:36 am |
Try this.
Code: |
dirline = %replace( @dirline, ".", " ")
dirline = %concat(" ",@dirline," ")
VAktywneKierunki = {}
#LOOPDB @DBPrzyciski {
#IF (%pos( %val, @dirline)) {
#call %btnenable( %key, 1)
#ADDITEM VAktywneKierunki %val
} {
#call %btnenable( %key, 0)
}
}
#IF (%pos("gora", @dirline) || %pos("gore", @dirline)) {
#call %btnenable( G, 1)
#ADDITEM VAktywneKierunki %val
} {
#call %btnenable( G, 0)
}
#IF (%class(Lazik)) {lazik_idz}
#OK
#T- allexits |
|
|
|
|
Nayuko Novice
Joined: 17 Jun 2008 Posts: 41
|
Posted: Tue Mar 01, 2011 9:36 am |
It works great :)
Thank you :)
Best regards,
N. |
|
|
|
|
|
|
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
|
|