${Ini problem

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

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

${Ini problem

Post by ml2517 » Fri Apr 23, 2004 7:46 am

There are two characters being tacked onto the end of that default value. I echo'd the result of one and it looks like this:

Code: Select all

NOTFOUND 

or 

NOTFOUND|| 
This is what my line of code looks like:

Code: Select all

/varset Radius ${Ini[@IniFile,Settings,Radius,NOTFOUND]}
I haven't tested to see if its tacking it onto actual entries that it finds in the INI file yet.

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

Post by ml2517 » Fri Apr 23, 2004 7:52 am

Verified:

It is also tacking those characters onto the end of values it finds in the INI file.

frabtik
a ghoul
a ghoul
Posts: 114
Joined: Sat Feb 21, 2004 10:07 am

Post by frabtik » Fri Apr 23, 2004 9:08 am

This is causing autodebuff to go nuts when loading the alerts up then?

Digitalxero
a ghoul
a ghoul
Posts: 129
Joined: Tue Sep 10, 2002 5:01 pm

Post by Digitalxero » Fri Apr 23, 2004 10:01 am

I cant seem to get ${Ini to return anything

Code: Select all

/declare INIFile global
/varset INIFile "D:\Backup\Downloads\macroquest2\Release\Macros\recipes.ini"
/echo ${Ini[@INIFile,wm,Cont,NOTFOUND]}
INI File

Code: Select all

[wm]
Cont="#sewing"
Comp0="mandrake root"
Comp1="mandrake root"
The echo only returns NOTFOUND. I have tried ${Ini[INIFile,wm,Cont,NOTFOUND]} AND ${Ini["INIFile","wm","Cont",NOTFOUND]} with the file name set with a #define <path to ini>

Am I missing something obvious to get it to return a value?

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

Post by ml2517 » Fri Apr 23, 2004 10:17 am

I'm honestly not sure if you can reference INI files with a full path like that. Someone was talking about it in IRC one day but I don't recall if they'd gotten it working or not.

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 » Fri Apr 23, 2004 11:33 am

dont use the full path. It defaults to in your macros directory anyway.
The two characters added are fixed in next zip, I'll get it out asap
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Wick
decaying skeleton
decaying skeleton
Posts: 3
Joined: Sat Apr 24, 2004 8:01 pm

Post by Wick » Sat Apr 24, 2004 8:10 pm

My macros rely on absolute path for ini since they communicate at runtime through a lan shared r/w ini. Will it be changed to allow absolute paths again?

I see from mqdata.cpp that it was done deliberately

Code: Select all

//	if (!strchr(pIniFile,'\\') && !strchr(pIniFile,'/'))// always insert macro path, screw whoever's using the absolute path.
		sprintf(FileName,"%s\\%s",gszMacroPath,pIniFile);
but I don't see the reasoning behind it. I've made the obvious fix locally for the time being. Can we fix it in the main dist? Or do I need to work around it somehow.

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:23 pm

The problem is there was no absolute or relative path detection. We can allow it with proper detection no problem.
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:04 am

I put in proper detection for relative/absolute paths for next zip.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Wick
decaying skeleton
decaying skeleton
Posts: 3
Joined: Sat Apr 24, 2004 8:01 pm

Post by Wick » Tue Apr 27, 2004 12:25 am

Thanks Lax :)

Wick
decaying skeleton
decaying skeleton
Posts: 3
Joined: Sat Apr 24, 2004 8:01 pm

Post by Wick » Thu Apr 29, 2004 8:22 pm

It's still missing the else clause, making all absolute INI paths fail:

Code: Select all

        if (pIniFile[0]!='\\' && !strchr(pIniFile,':'))
            sprintf(FileName,"%s\\%s",gszMacroPath,pIniFile);
--->    else
--->        strcpy(FileName,pIniFile);

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 » Thu Apr 29, 2004 8:39 pm

oops. fixed in next zip thanks
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0