Closed Darkenlord1 closed 3 years ago
[ Developer ]: scripts/vscripts/statcollection/schema.lua:86: attempt to index a nil value
You have some errors in your schema logic, be careful to check if the item actually exists before trying to do GetName()
, and should remove any prefix on the item name (such as item_
)
Also, you should have your schema variables have short names (3 or less characters), and we can give it a display name on our end, and this helps conserve bandwidth.
Check files again pls. I don't see errors.
For your ability display logic, rather than "No Ability 5" and other stuff, having it spit out -1
will do the job great. It won't display on pie charts and such but it is considered for win-rates and such.
Also for hero name, filtering out npc_dota_hero
will make graphs and winrate statistics easier to read.
Those two changes combined with shortening variable names and the schema can be created on our end
Shortening variable names, meaning max of two characters please.
playerName = pn abilitySlot1 = s1 abilitylvlSlot1 = l1
etc.
The names don't need to be readable. That's what your schema comments are for, and the names on our end are done manually.
I think now its work good? W8, i say if I complete work on this.
Now it's work fine.
Two things you need to change, the rest looks good now:
hst = math.floor(hero:GetStrength())
hin = math.floor(hero:GetIntellect())
pn
. If I am assuming correctly, you want to record the steam name. This is already covered by the library, so we won't waste space on that.Here's your schema, please review the fields to make sure I didn't make a mistake.
Feel free to suggest changes!
Schema: https://getdotastats.com/#s2__mod_schema?mid=150
Schema ID: https://getdotastats.com/#s2__my__mods
Ascentions need become in plural. And check shema file. I think i need set "test" flag on false before upd game?
The TESTING
setting of true means workshop games count (i.e. when you are testing locally). TESTING
set to false means only games in the dota2 proper client are recorded.
It's plural now. SchemaID should be unchanged.
Are your hst
and hin
now integers? Your console log showed them to be decimal before. You should floor them just in-case.
Now i reloaded files, shema and console log.
You included the version number in your schemaAuth.
Remove the v1
Your schemaAuth starts with C8
Complete
Hmm. I have question for you. I can make so stats will send without game end, on player disconnect?
That's a dedicated server thing. When the host rage quits in normal games, the game gets force quitted. Most games will have leavers too, so you don't want games to partially submit before game end either.
Every few weeks, Valve enables dedicated servers for a heap of the top custom games. I wouldn't worry about it.
i think i can set version in quotations ""?
Not sure what you mean.
Currently version of my mod setted at 0.82 without quotations, i want to set it "0.82" with quotations.
Oops. Was too busy to respond immediately, and then forgot to come back.
At the top of the schema, we say to use the following to set a flag:
statCollection:setFlags({version = GetVersion()})
If you don't have a function to return the game version, you would just use statCollection:setFlags({version = "0.82"})
Whack this line as early as possible into your code, before you pick heroes, etc.
xD I should go an close all of these.
Console Log settings.kv schema.lua addon_game_mode.lua gamemode.lua