• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Question - Why do I get NULL in my event

Soandso2

Well-known member
Joined
Mar 13, 2023
RedCents
937¢
My event triggers, but the variable in the event sub is NULL. I am doing (as far as I can see) exactly what the documentation says.

First we declare the event:
[CODE title="Declare event"]#Event SkillUp "You have become better at #1#"

[/CODE]
Then in my Sub Main (in the eternal loop)
[CODE title="Sub Main"]/doevents[/CODE]
And finally the sub
[CODE title="Sub Event"]Sub Event_SkillUp(Line,skill)
/echo Skillup: ${skill}
/return[/CODE]

If I echo the Line, I get the full line that triggered the event, but when I use skill as shown, it is NULL. Why? Also, IF I echo Line, this seems to trigger an event again, because it spams the skillup message over and over again.
My idea is to see this echo: "Skillup: disarm (3)"
 
Solution
now that is weird
hmmm
hmm try another word instead of skill, it might be a protected word for mq.
I was thinking that too, but thought I would have got an error or warning if I used a no-go-word. I changed it, let's see what happens.

That was the problem! Now it works! Skill seems to be a protected word!
Thanks a lot for the assistance! :)
I think your line var might not want to be capitalized, i would start there.

This is what i have for skillups:
#event SkillUp "You have become better at #1#! (#2#)"

Trying your suggestion right away. My thought was that my version would have captured the whole string after "at" in the text. Let's see what this does.

Ok, result already.
[CODE title="Sub Event"]Sub Event_SkillUp(line,skill,value)
/echo ${skill} went up: ${value}
/return[/CODE]

Results in NULL went up: 74
 
now that is weird
hmmm
hmm try another word instead of skill, it might be a protected word for mq.
I was thinking that too, but thought I would have got an error or warning if I used a no-go-word. I changed it, let's see what happens.

That was the problem! Now it works! Skill seems to be a protected word!
Thanks a lot for the assistance! :)
 
Solution
Question - Why do I get NULL in my event

Users who are viewing this thread

Back
Top
Cart