Hey there, the problem that I am having is that I'm trying to make a simple scripting language that is coded in notepad, then opens the Engine and it displays the code in a console window.
I am currently stuck at displaying text on the screen, if I enter a sentence
it will only show the first word in. Heres the code:
void say(char *text)
{
std:string say = "";
say += text;
cout << say;
}
char param1[100];
char param2[100];
char param3[100];
char param4[100];
//------------------------------------------------------------------------------ OPEN THE FILE
ifstream myfile ("test.txt");
if (myfile.is_open())
{
while (!myfile.eof())
{
myfile.getline(buffer, 100);
sscanf(buffer, "%s", command);
realCommand = command;
//------------------------------------------------------------------------------ Begin the script, everything script must have the tag to start.
if (realCommand == "say")
{
sscanf(buffer, "%*s %s", param1);
say(param1);
}
Any ideas, thanks :)