${ini} Bug?

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

${ini} Bug?

Post by LordGiddion » Sat Apr 24, 2004 10:03 am

not getting what I expected, trying to figure out if I'm getting what's intended.

Code: Select all

/varset Shortcutlist "${Ini[@IniFile,@SectionLabel,-1,NONE]}"
/echo @Shortcutlist
Returns "Null"
I expected it to return NONE, NULL is ok just wanted to know if it was "working as intended"

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Sat Apr 24, 2004 10:29 am

You'd have to post what you have stored in @IniFile and @SectionLabel at the time.

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

Post by LordGiddion » Sat Apr 24, 2004 10:55 am

There is nonthing in the match section that is why I expect NONE to be the return.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Sat Apr 24, 2004 12:13 pm

I didn't mean what is stored in your INI file, I meant what is stored in those variables.

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Sat Apr 24, 2004 2:11 pm

NULL is the standard response when something couldnt be parsed or the result is impossible to retrieve. Ini has two possible ways you could get NULL. One is if there is no comma in the []. The other is if GetPrivateProfileString returns 0.

I would assume that the Ini file you're trying to access doesnt exist. As he said, what is the valueof @Inifile?
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

Post by LordGiddion » Sat Apr 24, 2004 6:56 pm

The ini file exists and the section name exists it just has no keys in it.
The ini file is genbot_blah.ini and in other areas I read about 30 values out of it, in the same loop

Code: Select all

/varset Shortcutlist "${Ini[@IniFile,shortcut spells,-1,None]}"
returns the list of keys
and

Code: Select all

/varset Shortcutlist "${Ini[@IniFile,shortcut items,-1,None]}"
returns Null
the INI looks like this

Code: Select all

[shortcut spells] 
Nuke=draught of jiva 
Sow=Spirt of wolf 
PLBuff=Resolution|Shield of words 
[shortcut Items] 
[shortcut notarget Spells] 
ITU=Invisibility to undead 
[shortcut notarget items] 
Levi=Pegasus cloak
[shortcut AA]
[shortcut noTarget AA]
[Shortcut Disc]
[shortcut noTarget Disc] 

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Sat Apr 24, 2004 9:22 pm

probably because shortcut items section is empty. I guess default has nothing to do with when you're getting a list of keys.

case closed
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Mon Apr 26, 2004 1:05 am

alright.. the default will work for you in this case next zip.

If the ini file does not exist, you will get NULL
If the file exists, but nothing was retrieved (as above), you will get NULL unless a default was given. If the default was given, it will be used instead.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

Post by LordGiddion » Mon Apr 26, 2004 4:03 am

Thanks Lax, function as intended would have been a fine answer, I had posted because the results hadn't matched what I had expected from TLO doc.