Admittedly, wowroster/php confused me...

Helps with Argent Dawn's "Craftsman's Writ" quests

Moderator: Rihlsul

Admittedly, wowroster/php confused me...

Postby Rihlsul » Tue Jul 25, 2006 5:24 pm

I noticed that if I made functions within my add-on code, for some reason unknown to me, I had to pass things like $wordings and $roster_conf into the function as parameters.

That confused me, as "GLOBAL wowdb;" seemed to work, but not so much with "GLOBAL wowdb,wordings,roster_conf;"

If anyone has insight, please share.
Rihlsul,
Guild Leader of The Dirty Hordes
User avatar
Rihlsul
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 125
Joined: Tue Jul 04, 2006 8:27 pm

Admittedly, wowroster/php confused me...

Postby nightfighter » Tue Jul 25, 2006 7:35 pm

should be

Code: Select all
GLOBAL $wowdb,$wordings,$roster_conf;
User avatar
nightfighter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 169
Joined: Wed Jul 05, 2006 11:25 pm
Location: Boise, Idaho, USA

Re: Admittedly, wowroster/php confused me...

Postby Rihlsul » Tue Jul 25, 2006 7:54 pm

Heh... I think that was a typo I introduced at the forum level. I'll tinker in my 1.1 code and see if I can sort my globals out before releasing to the world though.
Rihlsul,
Guild Leader of The Dirty Hordes
User avatar
Rihlsul
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 125
Joined: Tue Jul 04, 2006 8:27 pm

Admittedly, wowroster/php confused me...

Postby nightfighter » Tue Jul 25, 2006 8:23 pm

If your functions are in a class then you might need to do the GLOBAL at the top of the class outside of any functions. Not sure if this is correct, but I seem to remember having to do that.
User avatar
nightfighter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 169
Joined: Wed Jul 05, 2006 11:25 pm
Location: Boise, Idaho, USA

Re: Admittedly, wowroster/php confused me...

Postby Rihlsul » Tue Jul 25, 2006 8:31 pm

That could be my troubles. Thanks for the pointers!

:thumright:
Rihlsul,
Guild Leader of The Dirty Hordes
User avatar
Rihlsul
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 125
Joined: Tue Jul 04, 2006 8:27 pm


Return to Writ Calculator

Who is online

Users browsing this forum: No registered users and 1 guest

cron