|
peewee Wanderer
Joined: 22 Oct 2000 Posts: 90 Location: Sweden
|
Posted: Fri Sep 13, 2002 10:13 am
Creating pointers |
Greetings and salutations!
Simple question... I have an alias, in which you define a variable... aliasname pref1,pref2,pref3,pref4 where pref4 is the name of the variable to use. However, I have not been able to access the variable in question... #VA name @pref4 works, so @name stores the name of the variable (say, "the_true_variable"). But, %numitems(@name) as well as %numitems(@@name) returns 1, but %numitems(@the_true_variable) returns 57, the number of items stored in @the_true_variable.
So, what I have is @name, which has "the_true_variable" stored, and @the_true_variable, which has 57 items stored in a working string list, but I cannot access @the_true_variable using @name it seems... There must be some syntax that I am missing out on, here... Sorry for bothering again, but some aid would be appreciated...
"May the Force be with you"
[url]peeweesweden@bredband.net[/url] |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Fri Sep 13, 2002 12:46 pm |
@{@varName}
Kjata |
|
|
|
peewee Wanderer
Joined: 22 Oct 2000 Posts: 90 Location: Sweden
|
Posted: Fri Sep 13, 2002 4:04 pm |
Domo arigato gozaimashita. I wonder what we "low-level" users would do without the constant aid of the gurus... probably tearing our hair trying to find what we want in the help files or simply give up.
Now all I have to do is find out why I cant use #loopdb {@RoomColors} {#NOOP %roomcol(%key,%val)} to reset the colors of the rooms on the map... *sigh*
I already mentioned it, but I guess it won't hurt to do it again...
#loopdb {@RoomColors} {#NOOP %roomcol(%key,%val)} does nothing, while
#loopdb {@RoomColors} {#SHOW Room - %key, color - %val)}
returns
Room - 566, color - 32768)
Room - 565, color - 32768)
Room - 564, color - 32768)
Room - 563, color - 32768)
Room - 562, color - 32768)
etc...
And manually doing
#NOOP %roomcol(566,32768)
Sets the room to the correct color. I have also tried
#loopdb {@RoomColors} {#NOOP %roomcol(%int(%key),%int(%val))}
as I know zMUD stored all variables as strings before, I dunno if it still does...
"May the Force be with you"
[url]peeweesweden@bredband.net[/url] |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sat Sep 14, 2002 6:12 pm |
I didn't answer to this problem on your other topic because I don't want to provide you with a post that really doesn't help you at all. However, some quick testing revealed that I have no such problem:
#VAR roomColors ""
#ADDKEY roomColors {123=6754|234=6742|432=7732}
#LOOPDB {@roomColors} {#SH %int(%key)}
correctly outputs:
123
234
432
I've tried other functions in place of %int too. I thought that perhaps the problem was that the mapper wasn't changing the room colors as fast as the loop was executing, but you seem to have the problem with other non-mapper functions too. So, I don't know what to say except... it works fine for me.
Kjata |
|
|
|
peewee Wanderer
Joined: 22 Oct 2000 Posts: 90 Location: Sweden
|
Posted: Sun Sep 15, 2002 1:07 am |
Ok, now I am freaking out... I tried that exact code, and I got
0
0
0
returned... *BOGGLE*
"May the Force be with you"
[url]peeweesweden@bredband.net[/url] |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Sun Sep 15, 2002 1:19 am |
What Kjata got on all my running betas:
1.x mhz W2K zMud 6.34, 233mhz W98se zMud 6.32, 233mhz W98se zMud 6.34
Ton Diening |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Sep 16, 2002 7:28 pm |
Try e-mailing Zugg. Not sure how much he can help if he can't reproduce it too, but he might have some idea about what causes this.
Kjata |
|
|
|
|
|
|
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
|
|