Raised This Month: $ Target: $400
 0% 

format/ex question/help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
da_ciouzan_oan
Junior Member
Join Date: Jun 2010
Old 11-10-2011 , 13:03   format/ex question/help
Reply With Quote #1

Hello,
I have a little problem with formatex.. Let's say I just used function parse, to split a text from a file.

Code:
parse(_fileData[_fileCount][0],                         _fileData[_fileCount][1],charsmax(_fileData[][]),                         _fileData[_fileCount][2],charsmax(_fileData[][]),                         _fileData[_fileCount][3],charsmax(_fileData[][]),                         _fileData[_fileCount][4],charsmax(_fileData[][]),                         _fileData[_fileCount][5],charsmax(_fileData[][]),                         _fileData[_fileCount][6],charsmax(_fileData[][]),                         _fileData[_fileCount][7],charsmax(_fileData[][]),                         _fileData[_fileCount][8],charsmax(_fileData[][]),                         _fileData[_fileCount][9],charsmax(_fileData[][]),                         _fileData[_fileCount][10],charsmax(_fileData[][]))

Variable _fileData[x][10] will contain for example "%s is %s's boss"

Next I have 1 array which holds names, _names[33][128]

Now.. when I try to format another string using formatex like this:

Code:
new msg[192] formatex(msg, charsmax(msg), _fileData[x][10], _names[0], _names[1])

I get the "Error: Array must be indexed (variable "_names") on line xx". Someone told me, function "formatex" doesn't knows that _fileData[x][10] contains 2 %s, so thats why I get that error.
I want to know how should I do so it will work as I want?

Don't know how to explain better.. if you don't understand I will post the entire code.

Thanks in advance.

Last edited by da_ciouzan_oan; 11-10-2011 at 13:04.
da_ciouzan_oan 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 14:22.


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