INI Files and the new system

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

Monk01
decaying skeleton
decaying skeleton
Posts: 6
Joined: Tue Jul 22, 2003 11:48 am

INI Files and the new system

Post by Monk01 » Mon Apr 05, 2004 5:12 pm

Are the old $ini file calls broke with the new data type system or am I just really missing something.

My INI file looks like this:
[General]
Master=Monk01

And I've tried to call it the following ways:

/echo $ini("myshaman.ini","General","Master")
/echo $ini("myshaman.ini" "General" "Master")
/echo $ini(myshaman.ini, General, Master)

Acording to the documentation in the readme.html one of these should have worked. What am I missing?

MrSmallie
a hill giant
a hill giant
Posts: 167
Joined: Fri Oct 11, 2002 11:18 am

Post by MrSmallie » Mon Apr 05, 2004 5:19 pm

Code: Select all

$ini(sample.ini,KeyOne,value1)
....

$ini(myshaman.ini,General,Master)
Me
[img]http://home.comcast.net/~mrsmallie/ches.JPG[/img]

Monk01
decaying skeleton
decaying skeleton
Posts: 6
Joined: Tue Jul 22, 2003 11:48 am

Post by Monk01 » Tue Apr 06, 2004 9:03 am

/echo text
Echo's the specified text and or variable values to the EQ client

Example:
/echo My current health is at $char(hp,pct)


/ini "ini filename" "keyname" "valuename" "value"
Writes data to the specified ini file. Also see $ini

stuff.ini contains:

[MySection]
Key1=123
Key2=This is cool!
Key3=Wheeee... 15

/ini "stuff.ini" "Section2" "ANewKey" "Some Data!"

stuff.ini after the above command is executed:

[MySection]
Key1=123
Key2=This is cool!
Key3=Wheeee... 15

[Section2]
ANewKey=Some Data!

My last line should have worked as is but I even added a string of text in the echo command so that it looked identical to the example give in the readme.html.

Still no good. What I'm wondering is, has anyone switched to the new data type system done any work with INI files. I haven't looked into how the commands are parsed yet to see if all lines are now parsed differently that begin with a $.

Monk01
decaying skeleton
decaying skeleton
Posts: 6
Joined: Tue Jul 22, 2003 11:48 am

Lax has the answer

Post by Monk01 » Tue Apr 06, 2004 12:24 pm

I saw this while searching the boards.
Yes as mentioned from the beginning some things arent in yet (see pages 1-3 of this thread), including $ini and a few others. Until then you should use both MQ2Data and MQ2Parm (together) if you are working on converting, and this way you only have to work and test various pieces at a time during conversion.
Guess I'll have to enable both systems for now.