Jump to content

[VB.NET]-Problema com INI API


Hitmanpt
 Share

Recommended Posts

Boas... Eu estou a utilizar uma INI API criada pelo fLaSh_PT mas estou com um problema a ler os dados... Simplesmente não carrega os dados

Dim nickname As String = INI.Read("C:\Users\Hitman\Documents\Visual Studio 2010\Projects\alterIWNet Launcher\alterIWNet Launcher\bin\Debug", "[Configuration]", "Nickname=", "ERROR")
        txtNickName.Text = nickname
esse é o codigo que estou a utilizar para ler... e o ficheiro ini tem esta estructura
[Configuration]
Server=server.alteriw.net
WebHost=auto
Nickname=^8[^2I^3B^1T^8]^3-^1Hitman^8.pt

Uma ajuda?

Link to comment
Share on other sites

INI.Read("INI_PATH", "seccao", "key", "quaquer_valor_por_defeto")

Tu tens

INI.Read("C:\Users\Hitman\Documents\Visual Studio 2010\Projects\alterIWNet Launcher\alterIWNet Launcher\bin\Debug", "[Configuration]", "Nickname=", "ERROR")

e deveria ser

INI.Read("C:\Users\Hitman\Documents\Visual Studio 2010\Projects\alterIWNet Launcher\alterIWNet Launcher\bin\Debug", "[Configuration]", "Nickname", "ERROR")

(Nickname sem o "=") e claro por o nome do ficheiro (que dizes que já colocaste)

Knowledge to the masses


Link to comment
Share on other sites

já tenho o código assim...

Dim nickname As String = INI.Read("C:\Users\Hitman\Documents\Visual Studio 2010\Projects\alterIWNet Launcher\alterIWNet Launcher\bin\Debug\alterIWnet.ini", "[Configuration]", "Nickname", "ERROR")

Mas continua a dar o valor predefinido... Tambem já tentei assim...

Dim nickname As String = INI.Read(Application.StartupPath & "\alterIWnet.ini", "[Configuration]", "Nickname", "ERROR")

Porque o ficheiro ini está no mesmo sitio do executavel...

Mais uma vez vou dar a estructura do ini pode ser que ajude...

[Configuration]

Server=server.alteriw.net

WebHost=auto

Nickname=^8[^2I^3B^1T^8]^3-^1Hitman^8.pt

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.