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

TFS 1.X+ Promotion errors after upgrading to tfs 1.5.

Erna

Moraliskt Stöd
Joined
Oct 26, 2009
Messages
40
Reaction score
19
Location
Sweden
Merged 1.3 alk custom rlmap together with the tfs 1.5 and this pops up in the enginelog when I attempt to buy promotion;



Lua Script Error: [Npc interface]
Data/npc/scripts/Queen Eloise.lua:eek:nCreatureSay
data/lib/core/player.lua:59: attempt to call method 'getPremiumDays' (a nil value)
stack traceback:
[C]: in function 'getPremiumDays'
data/lib/core/player.lua:59: in function 'isPremium'
data/npc/lib/npcsystem/modules.lua:120: in function 'callback'
data/npc/lib/npcsystem/keywordhandler.lua:31: in function 'processMessage'
data/npc/lib/npcsystem/keywordhandler.lua:186: in function 'processNodeMessage'
data/npc/lib/npcsystem/keywordhandler.lua:154: in function 'processMessage'
data/npc/lib/npcsystem/npchandler.lua:412: in function 'onCreatureSay'
data/npc/scripts/Queen Eloise.lua:7: in function <data/npc/scripts/Queen Eloise.lua:7>

/core/Player.lua

Queen Eloise.lua

Modules.lua

Keywordhandler.lua

Npchandler.lua
 
Solution
Somewhere between TFS 1.2 and 1.4 (1.3 wasn't officially released) TFS changed columns premdays and lastday into one column premium_ends_at.

Current player:isPremium() does not call player:getPremiumDays():
Also player:getPremiumDays() is now in Lua, before changes it was in C++:

All PACC related changes:
As soon as I get home I'll take a look... it shouldn't be difficult.
I'd appriciate that!

I don't really think it's that difficult either, it's most probably just new wordings/functions or something like that since I've upgraded from 1.3 to 1.5.
But I haven't really done much to ot's since back in the 7. era, so my knowledge is obsolete haha.
 
Somewhere between TFS 1.2 and 1.4 (1.3 wasn't officially released) TFS changed columns premdays and lastday into one column premium_ends_at.

Current player:isPremium() does not call player:getPremiumDays():
Also player:getPremiumDays() is now in Lua, before changes it was in C++:

All PACC related changes:
 
Solution
Somewhere between TFS 1.2 and 1.4 (1.3 wasn't officially released) TFS changed columns premdays and lastday into one column premium_ends_at.

Current player:isPremium() does not call player:getPremiumDays():
Also player:getPremiumDays() is now in Lua, before changes it was in C++:

All PACC related changes:
Thanks a ton champ!! The src files wer all in order, but I had to edit core/player.lua & migration 26/27.

I'm so glad that there's still a bunch of people out there that can share their hard-earned knowledge to the community so we do not end up as that other OT site from back in the days! <3
 
Back
Top