Just as the title says, I am having problems with StrFormat (or at least that's what the editor thinks the problem is). When I save the game (by save I mean in the editor), I get an error. It says 'Unexpected StrFormat'. But when I try to re-create this, with just 'money', I don't get the error.
I think this has something to do with GUI 3.
#sectionstart repeatedly_execute // DO NOT EDIT OR REMOVE THIS LINE
function repeatedly_execute() {
// string money;
// string health;
// string meleeweapon;
// string rangedweapon;
// string ammo;
// string attackpoints;
// string enemyhealth;
// string enemyattackpoints
// StrFormat(money,"%d",GetGlobalInt(8));
// StrFormat(health,"%d",GetGlobalInt(7));
// StrFormat(meleeweapon,"%s",GetGlobalString(11));
// StrFormat(rangedweapon,"%s",GetGlobalString(12));
// StrFormat(ammo,"%d",GetGlobalInt(17));
// StrFormat(attackpoints,"%d",GetGlobalInt(12));
// StrFormat(enemyhealth,"%d",GetGlobalInt(13));
// StrFormat(enemyattackpoints,"%d",GetGlobalInt(14));
// SetLabelText(0,4,health);
// SetLabelText(0,2,money);
// SetLabelText(3,0,health);
// SetLabelText(3,1,meleeweapon);
// SetLabelText(3,2,rangedweapon);
// SetLabelText(3,3,ammo);
// SetLabelText(3,5,attackpoints);
// SetLabelText(3,4,enemyhealth);
// SetLabelText(3,6,enemyattackpoints);
// put anything you want to happen every game cycle here
}
#sectionend repeatedly_execute // DO NOT EDIT OR REMOVE THIS LINE
(the slashes were added so I could save the game)
string enemyattackpoints;
;)
D'oh!