Custom Gametype Problems

Sailor Muffin

I'm in my lazy days
Hello!
I was trying to do a custom gametype
I tried doing with lua and soc
But when i open the game and load the mod
This happens

srb20000.png
 
G_AddGametype({
name = "NightsRace",
identifier = "NightsRace",
typeoflevel = TOL_NIGHTS|TOL_RACE,
rules = int_race,
intermissiontype = GTR_RACE,
headercolor = 103,
description = "Placeholder."
})
 
G_AddGametype({
name = "NightsRace",
identifier = "NightsRace",
typeoflevel = TOL_NIGHTS|TOL_RACE,
rules = int_race,
intermissiontype = GTR_RACE,
headercolor = 103,
description = "Placeholder."
})
You might have swapped int_race and GTR_RACE in intermissiontype and rules, since both of them aren't supposed to be like that.
 
I still get errors when i try to add the night stages for the mode

(SOC)
#Special Stages

Level 50
LevelName = Floral Field
Subtitle = Special Stage 1
Music = SPEC1
TypeOfLevel = Singleplayer,NiGHTS,NightsRace
NiGHTSAttack = true
SelectHeading = Special Stages
SkyNum = 1
Grades1 = 0,20000,30000,90000,180000,260000

Level 51
LevelName = Toxic Plateau
Subtitle = Special Stage 2
Music = SPEC2
TypeOfLevel = Singleplayer,NiGHTS,NightsRace
NiGHTSAttack = true
SelectHeading = Special Stages
SkyNum = 6
Grades1 = 0,35000,50000,100000,190000,300000

Level 52
LevelName = Flooded Cove
Subtitle = Special Stage 3
Music = SPEC3
TypeOfLevel = Singleplayer,NiGHTS,NightsRace
NiGHTSAttack = true
SelectHeading = Special Stages
SkyNum = 8
Grades1 = 0,70000,90000,180000,270000,360000

Level 53
LevelName = Cavern Fortress
Subtitle = Special Stage 4
Music = SPEC4
TypeOfLevel = Singleplayer,NiGHTS,NightsRace
NiGHTSAttack = true
SelectHeading = Special Stages
Weather = 1
SkyNum = 10
Grades1 = 0,40000,60000,140000,240000,300000

Level 54
LevelName = Dusty Wasteland
Subtitle = Special Stage 5
Music = SPEC5
TypeOfLevel = Singleplayer,NiGHTS,NightsRace
NiGHTSAttack = true
SelectHeading = Special Stages
SkyNum = 15
Grades1 = 0,35000,50000,80000,120000,150000

Level 55
LevelName = Magma Caves
Subtitle = Special Stage 6
Music = SPEC6
TypeOfLevel = Singleplayer,NiGHTS,NightsRace
NiGHTSAttack = true
SelectHeading = Special Stages
SkyNum = 20
Grades1 = 0,30000,45000,60000,90000,110000

Level 56
LevelName = Egg Satellite
Subtitle = Special Stage 7
Music = SPEC7
TypeOfLevel = Singleplayer,NiGHTS,NightsRace
NiGHTSAttack = true
SelectHeading = Special Stages
SkyNum = 22
Grades1 = 0,60000,70000,80000,90000,140000

Level 57
LevelName = Black Hole
Subtitle = Special Stage 8
Music = BHZ
TypeOfLevel = Singleplayer,NiGHTS,NightsRace
NiGHTSAttack = true
SelectHeading = Special Stages
NoVisitNeeded = true
SkyNum = 99
Unlockable = 16
Hidden = true
Grades1 = 0,50000,60000,70000,80000,140000
 
I still get errors when i try to add the night stages for the mode

(SOC)
#Special Stages

Level 50
LevelName = Floral Field
Subtitle = Special Stage 1
Music = SPEC1
TypeOfLevel = Singleplayer,NiGHTS,NightsRace
NiGHTSAttack = true
SelectHeading = Special Stages
SkyNum = 1
Grades1 = 0,20000,30000,90000,180000,260000

Level 51
LevelName = Toxic Plateau
Subtitle = Special Stage 2
Music = SPEC2
TypeOfLevel = Singleplayer,NiGHTS,NightsRace
NiGHTSAttack = true
SelectHeading = Special Stages
SkyNum = 6
Grades1 = 0,35000,50000,100000,190000,300000

Level 52
LevelName = Flooded Cove
Subtitle = Special Stage 3
Music = SPEC3
TypeOfLevel = Singleplayer,NiGHTS,NightsRace
NiGHTSAttack = true
SelectHeading = Special Stages
SkyNum = 8
Grades1 = 0,70000,90000,180000,270000,360000

Level 53
LevelName = Cavern Fortress
Subtitle = Special Stage 4
Music = SPEC4
TypeOfLevel = Singleplayer,NiGHTS,NightsRace
NiGHTSAttack = true
SelectHeading = Special Stages
Weather = 1
SkyNum = 10
Grades1 = 0,40000,60000,140000,240000,300000

Level 54
LevelName = Dusty Wasteland
Subtitle = Special Stage 5
Music = SPEC5
TypeOfLevel = Singleplayer,NiGHTS,NightsRace
NiGHTSAttack = true
SelectHeading = Special Stages
SkyNum = 15
Grades1 = 0,35000,50000,80000,120000,150000

Level 55
LevelName = Magma Caves
Subtitle = Special Stage 6
Music = SPEC6
TypeOfLevel = Singleplayer,NiGHTS,NightsRace
NiGHTSAttack = true
SelectHeading = Special Stages
SkyNum = 20
Grades1 = 0,30000,45000,60000,90000,110000

Level 56
LevelName = Egg Satellite
Subtitle = Special Stage 7
Music = SPEC7
TypeOfLevel = Singleplayer,NiGHTS,NightsRace
NiGHTSAttack = true
SelectHeading = Special Stages
SkyNum = 22
Grades1 = 0,60000,70000,80000,90000,140000

Level 57
LevelName = Black Hole
Subtitle = Special Stage 8
Music = BHZ
TypeOfLevel = Singleplayer,NiGHTS,NightsRace
NiGHTSAttack = true
SelectHeading = Special Stages
NoVisitNeeded = true
SkyNum = 99
Unlockable = 16
Hidden = true
Grades1 = 0,50000,60000,70000,80000,140000
Well it did say that, also I might be able to ask this reason. If you could atleast throw in your addon here, just incase.
 
You might need to add in freeslot("TOL_NIGHTSRACE") in the top or bottom in the lua file, that's the hole point.
Post automatically merged:

This is what you're supposed to fixed.

Example:
freeslot("TOL_NIGHTSRACE")

G_AddGametype({
    name = "NightsRace",
    identifier = "NightsRace",
    typeoflevel = TOL_NIGHTS|TOL_RACE,
    rules = int_race,
    intermissiontype = GTR_RACE,
    headercolor = 103,
    description = "Placeholder."
})
 

Who is viewing this thread (Total: 0, Members: 0, Guests: 0)

Back
Top