Sorry I didn't really think of fixing up the snippet to get it to compile on its own (its just the relevant part cut out from the game). Like I said yeah textsprite represents the sprite I was talking about. Your right I hadn't realized it but well it wasn't the cause of the problem all of the numbers where off by one so I fixed that. Here it is again. It should compile fine like this and I attached the image file.
#include "DarkGDK.h"
int textsprite=1;
void printspritetext(int posx, int posy,char* texttosprite){
int textnumber;for(int b=0; b<dbLen(texttosprite); b++){
if(dbRight(dbLeft(texttosprite,b),1)=="0")textnumber=1;
if(dbRight(dbLeft(texttosprite,b),1)=="1")textnumber=2;
if(dbRight(dbLeft(texttosprite,b),1)=="2")textnumber=3;
if(dbRight(dbLeft(texttosprite,b),1)=="3")textnumber=4;
if(dbRight(dbLeft(texttosprite,b),1)=="4")textnumber=5;
if(dbRight(dbLeft(texttosprite,b),1)=="5")textnumber=6;
if(dbRight(dbLeft(texttosprite,b),1)=="6")textnumber=7;
if(dbRight(dbLeft(texttosprite,b),1)=="7")textnumber=8;
if(dbRight(dbLeft(texttosprite,b),1)=="8")textnumber=9;
if(dbRight(dbLeft(texttosprite,b),1)=="9")textnumber=10;
if(dbRight(dbLeft(texttosprite,b),1)=="a")textnumber=11;
if(dbRight(dbLeft(texttosprite,b),1)=="b")textnumber=12;
if(dbRight(dbLeft(texttosprite,b),1)=="c")textnumber=13;
if(dbRight(dbLeft(texttosprite,b),1)=="d")textnumber=14;
if(dbRight(dbLeft(texttosprite,b),1)=="e")textnumber=15;
if(dbRight(dbLeft(texttosprite,b),1)=="f")textnumber=16;
if(dbRight(dbLeft(texttosprite,b),1)=="g")textnumber=17;
if(dbRight(dbLeft(texttosprite,b),1)=="h")textnumber=18;
if(dbRight(dbLeft(texttosprite,b),1)=="i")textnumber=19;
if(dbRight(dbLeft(texttosprite,b),1)=="j")textnumber=20;
if(dbRight(dbLeft(texttosprite,b),1)=="k")textnumber=21;
if(dbRight(dbLeft(texttosprite,b),1)=="l")textnumber=22;
if(dbRight(dbLeft(texttosprite,b),1)=="m")textnumber=23;
if(dbRight(dbLeft(texttosprite,b),1)=="n")textnumber=24;
if(dbRight(dbLeft(texttosprite,b),1)=="o")textnumber=25;
if(dbRight(dbLeft(texttosprite,b),1)=="p")textnumber=26;
if(dbRight(dbLeft(texttosprite,b),1)=="q")textnumber=27;
if(dbRight(dbLeft(texttosprite,b),1)=="r")textnumber=28;
if(dbRight(dbLeft(texttosprite,b),1)=="s")textnumber=29;
if(dbRight(dbLeft(texttosprite,b),1)=="t")textnumber=30;
if(dbRight(dbLeft(texttosprite,b),1)=="u")textnumber=31;
if(dbRight(dbLeft(texttosprite,b),1)=="v")textnumber=32;
if(dbRight(dbLeft(texttosprite,b),1)=="w")textnumber=33;
if(dbRight(dbLeft(texttosprite,b),1)=="x")textnumber=34;
if(dbRight(dbLeft(texttosprite,b),1)=="y")textnumber=35;
if(dbRight(dbLeft(texttosprite,b),1)=="z")textnumber=36;
if(dbRight(dbLeft(texttosprite,b),1)=="A")textnumber=37;
if(dbRight(dbLeft(texttosprite,b),1)=="B")textnumber=38;
if(dbRight(dbLeft(texttosprite,b),1)=="C")textnumber=39;
if(dbRight(dbLeft(texttosprite,b),1)=="D")textnumber=40;
if(dbRight(dbLeft(texttosprite,b),1)=="E")textnumber=41;
if(dbRight(dbLeft(texttosprite,b),1)=="F")textnumber=42;
if(dbRight(dbLeft(texttosprite,b),1)=="G")textnumber=43;
if(dbRight(dbLeft(texttosprite,b),1)=="H")textnumber=44;
if(dbRight(dbLeft(texttosprite,b),1)=="I")textnumber=45;
if(dbRight(dbLeft(texttosprite,b),1)=="J")textnumber=46;
if(dbRight(dbLeft(texttosprite,b),1)=="K")textnumber=47;
if(dbRight(dbLeft(texttosprite,b),1)=="L")textnumber=48;
if(dbRight(dbLeft(texttosprite,b),1)=="M")textnumber=49;
if(dbRight(dbLeft(texttosprite,b),1)=="N")textnumber=50;
if(dbRight(dbLeft(texttosprite,b),1)=="O")textnumber=51;
if(dbRight(dbLeft(texttosprite,b),1)=="P")textnumber=52;
if(dbRight(dbLeft(texttosprite,b),1)=="Q")textnumber=53;
if(dbRight(dbLeft(texttosprite,b),1)=="R")textnumber=54;
if(dbRight(dbLeft(texttosprite,b),1)=="S")textnumber=55;
if(dbRight(dbLeft(texttosprite,b),1)=="T")textnumber=56;
if(dbRight(dbLeft(texttosprite,b),1)=="U")textnumber=57;
if(dbRight(dbLeft(texttosprite,b),1)=="V")textnumber=58;
if(dbRight(dbLeft(texttosprite,b),1)=="W")textnumber=59;
if(dbRight(dbLeft(texttosprite,b),1)=="X")textnumber=60;
if(dbRight(dbLeft(texttosprite,b),1)=="Y")textnumber=61;
if(dbRight(dbLeft(texttosprite,b),1)=="Z")textnumber=62;
if(dbRight(dbLeft(texttosprite,b),1)==".")textnumber=63;
if(dbRight(dbLeft(texttosprite,b),1)=="!")textnumber=64;
if(dbRight(dbLeft(texttosprite,b),1)=="?")textnumber=65;
dbSetSpriteFrame(textsprite,textnumber);dbPasteSprite(textsprite,posx+20*b,posy);}}
void DarkGDK ( void ){
dbSyncOn ( );dbSyncRate ( 60 );
dbCreateAnimatedSprite(textsprite,"text.png",65,1,1);
while ( LoopGDK ( ) ){
printspritetext(20,20,"Testing123WhyWontThisWork!?.");
dbSync ( );}return;}
EDIT: I got it working. For any future people stuck on the same thing here is the functional version of the function.
void printspritetext(double posx, double posy,char* texttosprite){
for(int b=0; b<dbLen(texttosprite); b++){
test123blah=dbRight(dbLeft(texttosprite,b+1),1);textnumber=0;
if(strcmp(test123blah,"0")==0)textnumber=0;
if(strcmp(test123blah,"1")==0)textnumber=1;
if(strcmp(test123blah,"2")==0)textnumber=2;
if(strcmp(test123blah,"3")==0)textnumber=3;
if(strcmp(test123blah,"4")==0)textnumber=4;
if(strcmp(test123blah,"5")==0)textnumber=5;
if(strcmp(test123blah,"6")==0)textnumber=6;
if(strcmp(test123blah,"7")==0)textnumber=7;
if(strcmp(test123blah,"8")==0)textnumber=8;
if(strcmp(test123blah,"9")==0)textnumber=9;
if(strcmp(test123blah,"a")==0)textnumber=10;
if(strcmp(test123blah,"b")==0)textnumber=11;
if(strcmp(test123blah,"c")==0)textnumber=12;
if(strcmp(test123blah,"d")==0)textnumber=13;
if(strcmp(test123blah,"e")==0)textnumber=14;
if(strcmp(test123blah,"f")==0)textnumber=15;
if(strcmp(test123blah,"g")==0)textnumber=16;
if(strcmp(test123blah,"h")==0)textnumber=17;
if(strcmp(test123blah,"i")==0)textnumber=18;
if(strcmp(test123blah,"j")==0)textnumber=19;
if(strcmp(test123blah,"k")==0)textnumber=20;
if(strcmp(test123blah,"l")==0)textnumber=21;
if(strcmp(test123blah,"m")==0)textnumber=22;
if(strcmp(test123blah,"n")==0)textnumber=23;
if(strcmp(test123blah,"o")==0)textnumber=24;
if(strcmp(test123blah,"p")==0)textnumber=25;
if(strcmp(test123blah,"q")==0)textnumber=26;
if(strcmp(test123blah,"r")==0)textnumber=27;
if(strcmp(test123blah,"s")==0)textnumber=28;
if(strcmp(test123blah,"t")==0)textnumber=29;
if(strcmp(test123blah,"u")==0)textnumber=30;
if(strcmp(test123blah,"v")==0)textnumber=31;
if(strcmp(test123blah,"w")==0)textnumber=32;
if(strcmp(test123blah,"x")==0)textnumber=33;
if(strcmp(test123blah,"y")==0)textnumber=34;
if(strcmp(test123blah,"z")==0)textnumber=35;
if(strcmp(test123blah,"A")==0)textnumber=36;
if(strcmp(test123blah,"B")==0)textnumber=37;
if(strcmp(test123blah,"C")==0)textnumber=38;
if(strcmp(test123blah,"D")==0)textnumber=39;
if(strcmp(test123blah,"E")==0)textnumber=40;
if(strcmp(test123blah,"F")==0)textnumber=41;
if(strcmp(test123blah,"G")==0)textnumber=42;
if(strcmp(test123blah,"H")==0)textnumber=43;
if(strcmp(test123blah,"I")==0)textnumber=44;
if(strcmp(test123blah,"J")==0)textnumber=45;
if(strcmp(test123blah,"K")==0)textnumber=46;
if(strcmp(test123blah,"L")==0)textnumber=47;
if(strcmp(test123blah,"M")==0)textnumber=48;
if(strcmp(test123blah,"N")==0)textnumber=49;
if(strcmp(test123blah,"O")==0)textnumber=50;
if(strcmp(test123blah,"P")==0)textnumber=51;
if(strcmp(test123blah,"Q")==0)textnumber=52;
if(strcmp(test123blah,"R")==0)textnumber=53;
if(strcmp(test123blah,"S")==0)textnumber=54;
if(strcmp(test123blah,"T")==0)textnumber=55;
if(strcmp(test123blah,"U")==0)textnumber=56;
if(strcmp(test123blah,"V")==0)textnumber=57;
if(strcmp(test123blah,"W")==0)textnumber=58;
if(strcmp(test123blah,"X")==0)textnumber=59;
if(strcmp(test123blah,"Y")==0)textnumber=60;
if(strcmp(test123blah,"Z")==0)textnumber=61;
if(strcmp(test123blah,".")==0)textnumber=62;
if(strcmp(test123blah,"!")==0)textnumber=63;
if(strcmp(test123blah,"?")==0)textnumber=64;
dbSetSpriteFrame(textsprite,textnumber+1);
dbPasteSprite(textsprite,posx+15*b,posy);
}}