So i was trying to make a mod of a plasma pistol (i think using some outdated tutorial because i couldn't find any other gun modding tutorial,so that might be the problem) and when i thought i was done i started up starbound and got this error... Error: StarException: An error occurred during loading: VariantException: Improper conversion to double from string in get("power") float Variant::tget<float>(String, float) Variant::getFloat(String, float) ProjectileDatabase::readConfig(String) ProjectileDatabase::load() Root::reload() _Function_handler<void (), _Bind<ClientApplication:reSplashInitialization()::{lambda()#1} ()> >:_Any_data) ThreadImpl::runThread(void*) BaseThreadInitThunk RtlInitializeExceptionChain RtlInitializeExceptionChain ClientApplication:ostSplashInitialization() ClientApplication::update() StarApplicationBase::run() _SDL_main _console_main Anyone know what this means? I'm pretty new at modding so idk.
Since your using an older guide go here http://community.playstarbound.com/...d-errors-fixing-most-problems-yourself.69198/ Though you should read all of it - ideally. The part in orange is the most relevant. It details the major changes which has occured. One being numbers and true and false statements are no longer allowed to have quotes.
i fixed the problem but now i'm getting this Error: Could not load /projectiles/lastresortprojectile/lastresort.projectile asset, attempting to use default. AssetException: Could not read variant asset /projectiles/lastresortprojectile/lastresort.projectile caused by: JsonParsingException: Cannot parse json file: /projectiles/lastresortprojectile/lastresort.projectile caused by: JsonParsingException: Error parsing json: bad object, should be '}' or ',' at 3:1 this is from the starbound.log
That means you have a problem in line 3 of your script. It's missing a } or a , Usually that means you forgot a " , " at the end of the line. post the entire script here in a CODE bubble (click the icon that look slike a piece of paper with a <> in it on the forum post area. Then paste your code) we can't help for sure until we can see that.
Code: { "projectileName" : "LastResortProjectile" "physics" : "laser" "bounces" : 0 "level" : 3 "energyCostPerDamagePoint" : 155 "damageKindImage" : "LastResortProjectileicon.png" "frames" : "LastResortProjectile.png" "animationCycle" : 0.2 "frameNumber" : 2 "power" : 5000 "supportsProcessing" : true "actionOnReap" : [{"action" : "config","file" : "/projectiles/explosions/plasmabulletexplosion/plasmabulletexplosion.config"}] "lightColor" : [155, 212, 255] "damageKind" : "plasma" } There it is(it probably looks like a mess though,this is my first mod that i started pretty much yesterday).
well, there's your problem. every line except the last one and the closing } needs to have a , beside it. Otherwise it will error out. Like so: Code: { "projectileName" : "LastResortProjectile", "physics" : "laser", "bounces" : 0, "level" : 3, "energyCostPerDamagePoint" : 155, "damageKindImage" : "LastResortProjectileicon.png", "frames" : "LastResortProjectile.png", "animationCycle" : 0.2, "frameNumber" : 2, "power" : 5000, "supportsProcessing" : true, "actionOnReap" : [{"action" : "config","file" : "/projectiles/explosions/plasmabulletexplosion/plasmabulletexplosion.config"}], "lightColor" : [155, 212, 255], "damageKind" : "plasma" }
Ok, so i'm still getting the same error here,and i'm looking at an example file from the tutorial i mentioned and it doesn't even have the "physics" or "bounces" part in it,should i just go ahead and get rid of those or are they ok?
Nightly supports live edits in admin mode. just type /reload with admin mode active. And respawn a new gun to see the changes. That way you can quickly see the what each line does - without qutting and reloading the game each time
Actually these problems happen when i try to start up the game,like while it's loading.Also,how do you do nightly?
Ok! Through much trial and JSON errors i've finally stopped crashing at startup,but now it's just showing up as a perfectly generic item for some reason,also nightly build doesn't work for me(I'm running this on the 3D analyser so that's probably why...).
When you get a PGI - just quit the game and check your starbound.log it will tell you why it is a PGI. Modding is 50% starbound.log 50% developing.
Fixed that for you. Also, for the OP, if the Starbound.log cannot "read variant asset", try running the unreadable file through http://jsonlint.com/ This site automatically checks for errors in JSON files.