• 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!

Action [TFS 0.4][9.6 and some older]Offline training, with bar in-game

hi
im using 0.4 rev 5845 and not have this line in protocolgame.cpp

msg->put<uint16_t>(720);

plxxx help me
 
I use 0.4 rev 5801 and i havent this line in protocolgame.cpp:

msg->put<uint16_t>(720);

Why?

Please help.
 
Help ?

[4:22:23.492] Owned Cabulozo has logged in.

[4:22:23.494] [Error - CreatureScript Interface]
[4:22:23.494] data/creaturescripts/scripts/offtrain_login.lua:eek:nLogin
[4:22:23.494] Description:
[4:22:23.495] data/creaturescripts/scripts/offtrain_login.lua:15: attempt to perform arithmetic on a string value
[4:22:23.495] stack traceback:
[4:22:23.495] data/creaturescripts/scripts/offtrain_login.lua:15: in function <data/creaturescripts/scripts/offtrain_login.lua:2>
[4:22:23.496] Owned Cabulozo has logged out.

I'm having the same issue :/

- - - Updated - - -

I figured it out.. the storage value in the database was set at "A -" or something like that really random... Idk what happened
 
Theres no place to paste as tuto says Gesior
Code:
// offline training minutes
	std::string strValue;
	if(!player->getStorage("62666", strValue))
	{
		// no storage
		msg->put<uint16_t>(0);
	}
	else
	{
		msg->put<uint16_t>((uint16_t) atoi(strValue.c_str()));
	}
 
Help ?



I'm having the same issue :/

- - - Updated - - -

I figured it out.. the storage value in the database was set at "A -" or something like that really random... Idk what happened



i'm having same issue, you discover how fix? ty


Alfheim has logged in
[Error - CreatureScript Interface]
data/creaturescripts/scripts/offtrain_login.lua:eek:nLogin
Description:
data/creaturescripts/scripts/offtrain_login.lua:7: bad argument # 1 to 'min' <number expected, got string>
stack trackback;
[C]: in function 'min'
data/creaturescripts/scripts/offtrain_login.lua:7: in function {data/creaturescripts/scripts/offtrain_login.lua:2>
Alfheim has logged out.
 
Last edited:
I did everything like you said @Gesior.pl but the only problem I found is that it doesn't remove the time from the clock. can you help me figure why?

thanks.
 
I get this errors when players use the offline trainers. can someone help me figure out how to fix them? im using tfs 0.3.7_SUN (crying damson) client 9.60
everything works right, except for the fact that I get these errors that could potentially crash the server and the clock doesn't go down but that doesn't really bother me right now. (although I suspect it's because I am getting these errors which translates to the clock not working)

Please help someone!!!!

Code:
[Error - CreatureScript Interface]
data/creaturescripts/scripts/offtrain_login.lua:onLogin
Description:
data/creaturescripts/scripts/offtrain_login.lua:15: attempt to perform arithmetic on a string value
stack traceback:
data/creaturescripts/scripts/offtrain_login.lua:15: in function
<data/creaturescripts/scripts/offtrain_login.lua:2>



[Error - Global Event Interface]
data/globalevents/scripts/offtrain_addMinutes.lua:onThink
Description:
data/lib/103-offline-training.lua:59: attempt to perform arithmetic on a string value
stack traceback:
data/lib/103-offline-training.lua:59: in function 'OfflineTraining_addTime'
data/globalevents/scripts/offtrain_addMinutes.lua:3: in function
data/globalevents/offtrain_addMinutes.lua:1>
[Error - GlobalEvents::think] Couldn't execute event: offtrain_add_minutes
 
Back
Top