- Code: Select all
- loadVars("temp", "temp");
 sprintf(helper.text, "%i%i%i%i", winners[1],winners[2],winners[3],winners[4]);
 amountChar=charAmount;
 amountStock=stockAmount;
 charNo=selectedChar;
 charNo2=selectedChar2;
 charNo3=selectedChar3;
 charNo4=selectedChar4;
 modeGame=gameMode;
 typeGame=gameType;
 limitTime=timeLimit;
 switch(amountChar)
 {
 case 4:
 CreateActor("player", "none", "(none)", "(none)", -160, -20, true);
 CreateActor("player", "none", "(none)", "(none)", -50, -20, true);
 CreateActor("player", "none", "(none)", "(none)", 50, -20, true);
 CreateActor("player", "none", "(none)", "(none)", 160, -20, true);
 break;
 
 case 3:
 CreateActor("player", "none", "(none)", "(none)", -160, -20, true);
 CreateActor("player", "none", "(none)", "(none)", -50, -20, true);
 CreateActor("player", "none", "(none)", "(none)", 50, -20, true);
 DestroyActor("playerIndicator.3");
 DestroyActor("rank.3");
 break;
 
 case 2:
 CreateActor("player", "none", "(none)", "(none)", -160, -20, true);
 CreateActor("player", "none", "(none)", "(none)", -50, -20, true);
 DestroyActor("playerIndicator.3");
 DestroyActor("rank.3");
 DestroyActor("playerIndicator.2");
 DestroyActor("rank.2");
 break;
 }
 if(winners[0]==1)
 {
 Actor*rank3Actor=getclone("rank.3");
 strcpy(rank3Actor->text, "3rd Place");
 }
 charAmount=2;
 stockAmount=3;
 selectedChar=0;
 selectedChar2=0;
 selectedChar3=0;
 selectedChar4=0;
 gameMode=0;
 gameType=0;
 timeLimit=2;
 saveVars("temp", "temp");
for some reason, since i added the sprintf thing, the code comes to the sprintf line, and doesnt execute it or anything after it. I dont know why its doing this but this only happens when i try to access array values.
Is this happening to anyone else?





