Script that -yet again -does not work
So.. I have this line in my script:
int &toska = compare_magic("item-light");
if (&toska == 1)
{
sp_pframe(&dönk, 1);
}
if (&toska == 0)
{
sp_pframe(&dönk, 2);
}
So.. The problem is, I never get a positive answer. Not even when I have "item-light" armed. So what's wrong??
int &toska = compare_magic("item-light");
if (&toska == 1)
{
sp_pframe(&dönk, 1);
}
if (&toska == 0)
{
sp_pframe(&dönk, 2);
}
So.. The problem is, I never get a positive answer. Not even when I have "item-light" armed. So what's wrong??
Maybe the scripts name is too long? ( sometimes 8 chars are the maximum ) try using "item-lgt"
Hrm.. odd indeed, it looks fine..
So I guess.. make sure you're positive it is item-light that you have equiped..
And not sure if this means anything, but their items are always limited to just 3 chars, so maybe try making the script name item-lit.c and adding that, then try comparing..
And you're positive the problem isn't in the sp_pframe command? Just put a say("toska = &toska", 1); under each of them to make sure.
So I guess.. make sure you're positive it is item-light that you have equiped..
And not sure if this means anything, but their items are always limited to just 3 chars, so maybe try making the script name item-lit.c and adding that, then try comparing..
And you're positive the problem isn't in the sp_pframe command? Just put a say("toska = &toska", 1); under each of them to make sure.
Yeah.. I'm sure it isn't because of the pframe-command, since I already tried adding a text there.
I also tried to shorten up the item-name, but it didn't work.. Odd. Item-lgt really isn't a spell though, since it doesn't have the mana-thing, but I guess this problem couldn't have anything to do with that. *sigh*

did you try changing &toska also?
maybe use a global? (dunno why you'd need to)
maybe use a global? (dunno why you'd need to)
it is possible dink doesn't like the special character 'ö'. Also, if there is more than one item of "item-light" then it will also fail. But if you say you never get a positive answer, then yeah, the problem could be the name length of the script.