experiece and gold are like
then quest 1 finished is like
-
bool quest1finished=true;
-
so is it the same thing?
how do i search the line when i load?
whats a tokeniazer?
thanks
U will need to output first all of that data into a file.For the load take this example:
quest1:start,
quest1:finshed,
quest2:start,
quest2:finished.saved,gold=,exp=,
Now onto how to load a file:
As u can see every line has it's format:
quest<quest no.>operator ':' <quest status> operator '.' or operator ','
Now to the tokenizer.Tokenizer searchs the string for the first ocurance of symbols setted as it's parametar and returns a pointer to the first character in given string adn writes '\0' character just after the token.After first call it has for parametar, instead of line,a NULL pointer.For example:
In c/c++ tokenizer is strtok();
So if have string like:
quest1:finished.saved,gold=<value>,exp=<value>
The string should become:
quest1
finished
saved
gold
<value>
exp
<value>
For reference on using strtok() check
this out.
Savage