Author Topic: Not sure what i'm doing wrong?  (Read 5206 times)

Offline Hollow_Fang

  • Sergeant
  • **
  • Posts: 32
    • View Profile
Not sure what i'm doing wrong?
« on: January 22, 2015, 05:58:26 am »
When loaded up says
Mod failed to load Facilityvar
Yaml-cpp: error at line 3, column 2: end of map not found

not sure what i did wrong as there is not much info on more step by step creation :(
Any help would be great.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Not sure what i'm doing wrong?
« Reply #1 on: January 22, 2015, 06:22:38 am »
your indentation is all wrong

make sure your text editor uses a fixed width font, i suggest notepad++ as it supports yaml format natively.

compare this version:
« Last Edit: January 22, 2015, 09:37:52 am by Warboy1982 »

Offline Hollow_Fang

  • Sergeant
  • **
  • Posts: 32
    • View Profile
Re: Not sure what i'm doing wrong?
« Reply #2 on: January 22, 2015, 07:05:53 am »
your indentation is all wrong

make sure your text editor uses a fixed width font, i suggest notepad++ as it supports yaml format natively.

compare this version:
i am using NP++?
i set it to yaml

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Not sure what i'm doing wrong?
« Reply #3 on: January 22, 2015, 07:20:20 am »
Try this: https://falkooxc2.pythonanywhere.com/rulcheck

Click where it says Open rulfile, then copy/paste your ruleset there (delete first what's already in the validator). Save and close, then test your ruleset. It will tell you precisely where the syntax issues are located.

Offline Hollow_Fang

  • Sergeant
  • **
  • Posts: 32
    • View Profile
Re: Not sure what i'm doing wrong?
« Reply #4 on: January 22, 2015, 07:52:32 am »
Try this: https://falkooxc2.pythonanywhere.com/rulcheck

Click where it says Open rulfile, then copy/paste your ruleset there (delete first what's already in the validator). Save and close, then test your ruleset. It will tell you precisely where the syntax issues are located.
is the red in NP++ showing error in code or what idk coding very well at all .
right now my main goal is to figure out why the image in my resources is not show up
Code: [Select]
facilities:
  - type: STR_Micro_RADAR_SYSTEM
mapName: XBASE_04
  - type: STR_Micro_Radar_System
spriteShape: 201
buildCost: 20000
buildTime: 5
monthlyCost: 1000
radarRange: 500
radarChance: 5
mapName: XBASE_04
radarRange: 800
radarChance: 7
costBuy: 500
costRent: 200
- type: STR_Tiny_Radar_System
  mapName: XBASE_04
  - type: STR_Tiny_Radar_System_2
    spriteShape: 2
    spriteFacility: 21
    buildCost: 20000
    buildTime: 5
    monthlyCost: 1000
    radarRange: 500
    radarChance: 5
    mapName: XBASE_04
    radarRange: 800
    radarChance: 7
    costBuy: 500
    costRent: 200
  - type: STR_SMALL_RADAR_SYSTEM
    requires:
    - STR_ALIEN_ALLOYS
    - STR_ELERIUM_115
    spriteShape: 2
    spriteFacility: 21
    buildCost: 500000
    buildTime: 12
    monthlyCost: 10000
    radarRange: 1500
    radarChance: 10
    mapName: XBASE_04
  - type: STR_LARGE_RADAR_SYSTEM
    requires:
    - STR_UFO_NAVIGATION - STR_ALIEN_ALLOYS - STR_ELERIUM_115
    spriteShape: 1
    SpriteFacility: 22
    buildCost: 800000
    buildTime: 25
    monthlyCost: 15000
    radarRange: 2250
    radarChance: 20
    mapName: XBASE_05
    extraSprites:
    files:
  201: extraSprites:/Resources/FacilityVar/MicroRadar.gif
  202: extraSprites:/Resources/FacilityVar/TinyRadar.gif
extraStrings:
  - type: en-US
    strings:
      STR_Micro_RADAR_SYSTEM_2: "Micro Radar System"
      STR_Tiny_Radar_System_2: "Large Storage Facility"

Thanks for helping me out too hope i can get this working as i got plans to make other buildings in variations
« Last Edit: January 22, 2015, 08:47:41 am by Hollow_Fang »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Not sure what i'm doing wrong?
« Reply #5 on: January 22, 2015, 09:38:41 am »
i've re-fixed and re-uploaded my original attachment, there were some more indentation errors and a missing "extraSprites:", as well as missing strings.

yes, if notepad++ is showing you red lines, that means there's something wrong
« Last Edit: January 22, 2015, 01:29:36 pm by Warboy1982 »