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

Linux Problem with runes and fluid containers - subType errors

arctix

New Member
Joined
Jun 4, 2008
Messages
13
Reaction score
0
Location
Poland
Hey!
When im starting my OTS running on TFS I'm getting this (and many others, but only numbers and names are changing) warning:
Code:
[Warning] NpcSystem:	SubType missing for parameter item:	stalagmite rune,2292,120
I've found this part of code, that maybe will help to solve this problem:
Code:
-- Parse a string contaning a set of buyable items.
	function ShopModule:parseBuyable(data)
		for item in string.gmatch(data, '[^;]+') do
			local i = 1

			local name = nil
			local itemid = nil
			local cost = nil
			local subType = nil
			local realName = nil

			for temp in string.gmatch(item, '[^,]+') do
				if(i == 1) then
					name = temp
				elseif(i == 2) then
					itemid = tonumber(temp)
				elseif(i == 3) then
					cost = tonumber(temp)
				elseif(i == 4) then
					subType = tonumber(temp)
				elseif(i == 5) then
					realName = temp
				else
					print('[Warning] NpcSystem:', 'Unknown parameter found in buyable items parameter.', temp, item)
				end
				i = i + 1
			end

			if(SHOPMODULE_MODE == SHOPMODULE_MODE_TRADE) then
				if(itemid ~= nil and cost ~= nil) then
					if((isItemRune(itemid) == TRUE or isItemFluidContainer(itemid) == TRUE) and subType == nil) then
						print('[Warning] NpcSystem:', 'SubType missing for parameter item:', item)
					else
						self:addBuyableItem(nil, itemid, cost, subType, realName)
					end
				else
					print('[Warning] NpcSystem:', 'Parameter(s) missing for item:', itemid, cost)
				end
			else
				if(name ~= nil and itemid ~= nil and cost ~= nil) then
					if((isItemRune(itemid) == TRUE or isItemFluidContainer(itemid) == TRUE) and subType == nil) then
						print('[Warning] NpcSystem:', 'SubType missing for parameter item:', item)
					else
						local names = {}
						table.insert(names, name)
						self:addBuyableItem(names, itemid, cost, subType, realName)
					end
				else
					print('[Warning] NpcSystem:', 'Parameter(s) missing for item:', name, itemid, cost)
				end
			end
		end
	end
It's only warning, so it looks, that everything should work fine, buy better will be if server will start smoothly and without spam warnings. Next problem may be caused by user that is connecting to database, anyways not root is connecting. But when I connect by root this error doesn't appear. I'm not sure but i think, that connecting by root is highly risky - if I'm wrong, then please correct me. I'm getting these errors:
Code:
Trigger: ondelete_accounts does not exist, creating it...
mysql_real_query(): CREATE TRIGGER `ondelete_accounts` BEFORE DELETE ON `accounts` FOR EACH ROW BEGIN DELETE FROM `bans` WHERE `type` != 1 AND `type` != 2 AND `value` = OLD.`id`; END;: MYSQL ERROR: Access denied; you need the SUPER privilege for this operation
> Trigger: oncreate_guilds does not exist, creating it...
mysql_real_query(): CREATE TRIGGER `oncreate_guilds` AFTER INSERT ON `guilds` FOR EACH ROW BEGIN INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('the Leader', 3, NEW.`id`); INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('a Vice-Leader', 2, NEW.`id`); INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('a Member', 1, NEW.`id`); END;: MYSQL ERROR: Access denied; you need the SUPER privilege for this operation
> Trigger: ondelete_guilds does not exist, creating it...
mysql_real_query(): CREATE TRIGGER `ondelete_guilds` BEFORE DELETE ON `guilds` FOR EACH ROW BEGIN UPDATE `players` SET `guildnick` = '', `rank_id` = 0 WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = OLD.`id`); END;: MYSQL ERROR: Access denied; you need the SUPER privilege for this operation
> Trigger: oncreate_players does not exist, creating it...
mysql_real_query(): CREATE TRIGGER `oncreate_players` AFTER INSERT ON `players` FOR EACH ROW BEGIN INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 0, 10); INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 1, 10); INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 2, 10); INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 3, 10); INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 4, 10); INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 5, 10); INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 6, 10); END;: MYSQL ERROR: Access denied; you need the SUPER privilege for this operation
> Trigger: ondelete_players does not exist, creating it...
mysql_real_query(): CREATE TRIGGER `ondelete_players` BEFORE DELETE ON `players` FOR EACH ROW BEGIN DELETE FROM `bans` WHERE `type` = 2 AND `value` = OLD.`id`; UPDATE `houses` SET `owner` = 0 WHERE `owner` = OLD.`id`; END;: MYSQL ERROR: Access denied; you need the SUPER privilege for this operation
 
Last edited:
First problem:
It's not npcsystem fault. Perhaps it's an error in one of your NPC scripts.

Second:
dunno, are you a root or you are using other user?

@edit
ah, noticed that you are a root. it's just database update, your other user haven't much privileges or something
 
Look for: stalagmite rune,2292,120 at your NPC(s) and add subType?
Code:
stalagmite rune,2292,120,count
 
Almost 2 months later - I've got same problem, but this time only with subType warning. For example warning for hmm rune:
[Warning] NpcSystem: SubType missing for parameter item: heavy magic missile rune,2311,120
Now let's check file used by npc located in npc/scripts:
shopModule:addBuyableItem({'heavy magic missile'}, 2311, 120, 10, 'heavy magic missle rune')
In npc/scripts/lib/npcsystem/modules.lua I've found this:
function ShopModule:addBuyableItem(names, itemid, cost, subType, realName)
So looks like everything is correct, but if tfs is giving error, then something cant't be all right.
 
Back
Top