Page 1 of 1

Mod Issues: unsigned short error

Posted: Tue Apr 12, 2016 6:45 am
by Scirules
I'm a new modder and whilst trying to load my finished creation (Gigantic power pole) I ran into this: Error while loading technology prototype "Alien-Power-transmission" (technology): conversion of data to type "unsigned short" failed Modifications: Alien Power Transmission.
Does anyone know what this is, or something similar? And yes, I tried looking for it, both on Google and the forum, both turned bubcus.

Re: Mod Issues: unsigned short error

Posted: Tue Apr 12, 2016 7:10 am
by daniel34
Moved to Modding help.

Unsigned short is a number variable type that has a range from 0 to 65535.
You are either using a number outside that range (such as a negative or >65535 number) or something that is not a number at all (table, string) in a place where Factorio expects a number.

Can you post the code of the technology prototype for your power pole?

Re: Mod Issues: unsigned short error

Posted: Tue Apr 12, 2016 10:42 pm
by Scirules
thanks for the information, looking at the file I realized what the problem was. I set one of the research values as a decimal. (Im tryig that fix now.)

Re: Mod Issues: unsigned short error

Posted: Tue Apr 12, 2016 10:57 pm
by Scirules
well that worked but now I need to look up this source path error, have a feeling it has to do with texturing.

Re: Mod Issues: unsigned short error

Posted: Tue Apr 12, 2016 11:00 pm
by Scirules
Definitely looks like texture. Is it ok if I simply copy the game textures?

Re: Mod Issues: unsigned short error

Posted: Tue Apr 12, 2016 11:08 pm
by prg
You can simply use base game graphics like "__base__/graphics/icons/basic-grenade.png", no need to copy them into your own mod.

Re: Mod Issues: unsigned short error

Posted: Tue Apr 12, 2016 11:17 pm
by Scirules
Copied directly from one of my files(game files actually as i used the substation as a template.):

"filename = "__base__/graphics/entity/small-electric-pole/electric-pole-radius-visualization.png","

Re: Mod Issues: unsigned short error

Posted: Tue Apr 12, 2016 11:34 pm
by prg
And this is giving the error? Sure there isn't a different path specification somewhere that doesn't follow this format?

Re: Mod Issues: unsigned short error

Posted: Tue Apr 12, 2016 11:46 pm
by Scirules
I'll poke around, but all of the things I made were vanilla templates... :|

Re: Mod Issues: unsigned short error

Posted: Wed Apr 13, 2016 12:06 am
by Scirules
I cant find ANYTHING, would you mind helping? :?

Re: Mod Issues: unsigned short error

Posted: Wed Apr 13, 2016 12:31 am
by prg
icon = "" in technology.lua is missing a file name.

Re: Mod Issues: unsigned short error

Posted: Wed Apr 13, 2016 5:15 am
by Scirules
It worked, you're a lifesaver! I don't suppose you have any ideas on balancing the recipe? I'm very bad at that kind of planning.
If you do email me at scirues.artness@gmail.com

Re: Mod Issues: unsigned short error

Posted: Wed Apr 13, 2016 5:25 am
by Scirules
Never mind, Just load and found it uses the wire reach and service size values of a substation, I crated a very expensive copy of a substation!!?
Sorry i'm tired and this makes no sense.