Raised This Month: $ Target: $400
 0% 

Convert const to aray and load data from .ini file


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-28-2012 , 21:49   Re: Convert const to aray and load data from .ini file
Reply With Quote #2

I would do something like this:

PHP Code:
new szMessage[64], szRed[4], szGreen[4], szBlue[4], iRediBlueiGreen
// open file and get get line
parse(line_from_fileszMessagecharsmax(szMessage), szRedcharsmax(szRed), szGreencharsmax(szGreen), szBluecharsmax(szBlue))
iRed str_to_num(szRed)
iGreen str_to_num(szGreen)
iBlue str_to_num(szBlue)
// add data to global arrays 
File format:
Code:
"Your message here" 255 255 255
"Your message here" 255 255 255
"Your message here" 255 255 255
"Your message here" 255 255 255
"Your message here" 255 255 255
__________________
fysiks is offline
 



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 13:29.


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