• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Need help {C++} (Solved)

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,857
Reaction score
96
Location
Brazil
I followed this tutorial to get much real QuestLog to my tasks.

I have replaced the whole code:

LUA:
std::string Mission::getDescription(Player* player)
{
	std::string value;
	player->getStorage(storageId, value);
	if(state.size())
		return parseStorages(state, value);

	if(atoi(value.c_str()) >= endValue)
		return parseStorages(states.rbegin()->second, value);

	for(int32_t i = endValue; i >= startValue; --i)
	{
		player->getStorage(storageId, value);
		if(atoi(value.c_str()) == i)
			return parseStorages(states[i - startValue], value);
	}

	return "Couldn't retrieve any mission description, please report to a gamemaster.";
}

With the new code, but I receive this error:

98447258.jpg


How can I solve? Using rev3884.


EDIT:
replace all:
[cpp]atoi(temp.c_str())[/cpp]
with:
[cpp]temp[/cpp]


kind regards, Evil Hero.
 
Last edited:
Ok, compiled but tasks are not being counted in Questlog as it should do.
The counter is freezed in number 1.
tasksh.jpg



PS.: It's not error in questlog.
LUA:
	<mission name="Paw and Fur: Goblins" storageid="1511" startvalue="0" endvalue="2">
		<missionstate id="1" description="You already hunted |STORAGE:1511| goblins. You are supposed to kill 150 in total."/>
		<missionstate id="2" description="You killed 150 goblins."/>
	</mission>

you have to put the storagekey where you store the kills not the questlog itself.
I've tested it several times and it worked fine for me.
change the |STORAGE:1511| to the storagekey which you use for this monster.


kind regards, Evil Hero.
 
Back
Top