| View previous topic :: View next topic |
| Author |
Message |
hodge CWG - Member

Joined: Sep 18, 2005 Posts: 65
|
Posted: Mon Oct 10, 2011 10:04 pm Post subject: DG Scripts: %actor.eq(wield).vnum% returns 0 |
|
|
The character who triggers the script (actor) is wielding a spiked club, vnum 7822.
%actor.eq(wield).vnum% seems to return 0, but %actor.eq(wield).shortdesc% returns 'a spiked club' perfectly.
Thoughts? Something I'm missing? |
|
| Back to top |
|
 |
hodge CWG - Member

Joined: Sep 18, 2005 Posts: 65
|
Posted: Mon Oct 10, 2011 11:02 pm Post subject: |
|
|
So, a little more digging turned up Kyle's fishing script (I knew it was there somewhere).
Using this:
| Code: | | eval wielded %actor.eq(wield)% |
followed by
works perfectly.
I'm still not 100% clear on why
| Code: | | %actor.eq(wield).vnum% |
doesn't return the same thing. |
|
| Back to top |
|
 |
Kyle CWG - Honored Elder

Joined: Nov 29, 2006 Posts: 301 Location: British Columbia - Canada
|
Posted: Fri Nov 11, 2011 10:50 pm Post subject: |
|
|
Well, I can't think of a good reason...
Let me play a bit and I'll post back. _________________ The Augmented dimension : mud.themudhost.net port 5000
Owner |
|
| Back to top |
|
 |
Jamdog CWG - Honored Elder

Joined: Jun 18, 2006 Posts: 1685 Location: Halesowen, England
|
Posted: Thu Nov 17, 2011 1:12 pm Post subject: |
|
|
| hodge wrote: | I'm still not 100% clear on why
| Code: | | %actor.eq(wield).vnum% |
doesn't return the same thing. |
Not sure either, but you should be able to do something like
| Code: | | %%%actor.eq(wield)%%.vnum% |
Can't remember the exact syntax for it, but can use % like parentheses. I'm sure someone will post the correct method if mine is wrong, but I was unable to find an example... _________________
 |
|
| Back to top |
|
 |
Fizban CWG - Honored Elder

Joined: Nov 26, 2005 Posts: 1390 Location: Shelby Township, Michigan
|
Posted: Mon Dec 05, 2011 2:04 pm Post subject: |
|
|
Don't think it will double parse in anything but an eval.
In theory though the syntax would be %%%actor.eq(wield)%.vnum%%
EDIT: Hmm, somehow skipped the first post the first time and just saw the second and subsequent posts, apparently it is parsing right if %actor.eq(wield).shortdesc% evaluates properly, so no clue why only vnum requires an eval line. _________________
DG Script Reference Forum
4 Dimensions |
|
| Back to top |
|
 |
|