When I compile code with a switch() statement, the numbers 008 and 009 do not compile properly and throws a bad number error.
Numbered Steps to Reproduce Problem:
Create a function that uses 008 or 009 integers in a switch statement.
Code Snippet (if applicable) to Reproduce Problem:
mob/proc
ChangeHair(var/HairNum)
switch(src.Gender)
if("Male")
switch(HairNum)
if(001)
src.overlays-=src.Char_Overlays["Hair"]
var/obj/Characters/Male/Head/_001Hair_M/O=new()
Char_Overlays["Hair"]=O
src.overlays+=Char_Overlays["Hair"]
src.HairNum=001
if("Female")
switch(HairNum)
if(001)
src.overlays-=src.Char_Overlays["Hair"]
var/obj/Characters/Female/Head/_001Hair_F/O=new()
Char_Overlays["Hair"]=O
src.overlays+=Char_Overlays["Hair"]
src.HairNum=001
if(002)
src.overlays-=src.Char_Overlays["Hair"]
var/obj/Characters/Female/Head/_002Hair_F/O=new()
Char_Overlays["Hair"]=O
src.overlays+=Char_Overlays["Hair"]
src.HairNum=002
if(003)
src.overlays-=src.Char_Overlays["Hair"]
var/obj/Characters/Female/Head/_003Hair_F/O=new()
Char_Overlays["Hair"]=O
src.overlays+=Char_Overlays["Hair"]
src.HairNum=003
if(004)
src.overlays-=src.Char_Overlays["Hair"]
var/obj/Characters/Female/Head/_004Hair_F/O=new()
Char_Overlays["Hair"]=O
src.overlays+=Char_Overlays["Hair"]
src.HairNum=004
if(005)
src.overlays-=src.Char_Overlays["Hair"]
var/obj/Characters/Female/Head/_005Hair_F/O=new()
Char_Overlays["Hair"]=O
src.overlays+=Char_Overlays["Hair"]
src.HairNum=005
if(006)
src.overlays-=src.Char_Overlays["Hair"]
var/obj/Characters/Female/Head/_006Hair_F/O=new()
Char_Overlays["Hair"]=O
src.overlays+=Char_Overlays["Hair"]
src.HairNum=006
if(007)
src.overlays-=src.Char_Overlays["Hair"]
var/obj/Characters/Female/Head/_007Hair_F/O=new()
Char_Overlays["Hair"]=O
src.overlays+=Char_Overlays["Hair"]
src.HairNum=007
if(008)
//The error happens here
src.overlays-=src.Char_Overlays["Hair"]
var/obj/Characters/Female/Head/_008Hair_F/O=new()
Char_Overlays["Hair"]=O
src.overlays+=Char_Overlays["Hair"]
src.HairNum=008
if(009)
//And here.
src.overlays-=src.Char_Overlays["Hair"]
var/obj/Characters/Female/Head/_009Hair_F/O=new()
Char_Overlays["Hair"]=O
src.overlays+=Char_Overlays["Hair"]
src.HairNum=009
if(010)
src.overlays-=src.Char_Overlays["Hair"]
var/obj/Characters/Female/Head/_010Hair_F/O=new()
Char_Overlays["Hair"]=O
src.overlays+=Char_Overlays["Hair"]
src.HairNum=010
UpdateOverlays()
Expected Results:
The compiler to compile the switch() statement without throwing a compile time error.
Actual Results:
The compiler throws a bad number error on switch() statements for the values 008 and 009.
Does the problem occur:
Every time? Or how often?
Every time.
In other games?
N/A
In other user accounts?
N/A
On other computers?
Unknown.
When does the problem NOT occur?
It always occurs on this version.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? I do not know if it didn't happen in earlier versions.
Workarounds:
None known.