Raised This Month: $ Target: $400
 0% 

Trouble splitting strings x_x


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Spunky
Senior Member
Join Date: May 2008
Location: Orlando, Fl.
Old 03-17-2009 , 13:49   Trouble splitting strings x_x
Reply With Quote #1

Code:
new szOutput[32], iLen read_file(szFilePath, 0, szOutput, 31, iLen) strtok(szOutput, szOutput, 31, g_szHostname, 31, '=', 1) remove_quotes(g_szHostname) read_file(szFilePath, 1, szOutput, 31, iLen) strtok(szOutput, szOutput, 31, g_szUsername, 31, '=', 1) remove_quotes(g_szUsername) read_file(szFilePath, 2, szOutput, 31, iLen) strtok(szOutput, szOutput, 31, g_szPassword, 31, '=', 1) remove_quotes(g_szPassword) read_file(szFilePath, 3, szOutput, 31, iLen) strtok(szOutput, szOutput, 31, g_szDatabase, 23, '=', 1) remove_quotes(g_szDatabase)

The file being read from:
Quote:
vm_hostname = "localhost"
vm_username = "root"
vm_password = ""
vm_database = "amx"
The error:
Quote:
[AMXX] Plugin says: Unknown MySQL server host '= "l
The tuple and everything worked absolutely fine when I was setting it manually. When I started trying to read these settings from a file, it stopped working.
Spunky is offline
Send a message via AIM to Spunky
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:52.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode