Raised This Month: $ Target: $400
 0% 

Parsing code from a cfg file.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PreDominance
Member
Join Date: Jul 2014
Old 08-07-2014 , 10:44   Parsing code from a cfg file.
Reply With Quote #1

Greetings,

Is it possible at all to take code from a CFG file, parse it, then run it? For example.

code.cfg
Code:
   cs_set_user_money(id, 16000);
include.inl

Code:
..open file, etc.. new szLine[MAX_LINE_LENGTH]; 
fgets(file, szLine, charsmax(szLine)); 
..execute szLine..
I do not want to map out commands, e.g:
Code:
if (equali(szLine, "cs_set_user_money")) {}
Thanks for any help!

Last edited by PreDominance; 08-07-2014 at 10:45.
PreDominance is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-07-2014 , 18:15   Re: Parsing code from a cfg file.
Reply With Quote #2

I don't believe that that is possible and I would strongly recommend against doing that if it were.
__________________
fysiks is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 08-08-2014 , 05:06   Re: Parsing code from a cfg file.
Reply With Quote #3

Not possible. You'd have to do what I think you mentioned at the very end of your post.
__________________
ddhoward is offline
PreDominance
Member
Join Date: Jul 2014
Old 08-08-2014 , 08:10   Re: Parsing code from a cfg file.
Reply With Quote #4

Thanks for the reassurances guys. I've settled for parsing configs alone and not code.
PreDominance is offline
Reply



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:18.


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