How can I display the value of a GlobalInt on a label?
For exampel the GI 7 on label "lblPoints"
String labeltext = String.Format("%d", GetGlobalInt(7));
lblPoints.Text = labeltext;
I entered
Quote
// script for Room: Player enters room (before fadein)
String labeltext = String.Format("%d",GetGlobalInt(7));
nigeriaSpTore.Text = labeltext;
SetGlobalInt(7,5);
but the value remains 0
I would say you have to set the GlobalInt before you update the label string.
Everytime you change the value of the GlobalInt you have to update your label accordingly.
Or put this in repeatedly_execute():
String labeltext = String.Format("%d",GetGlobalInt(7));
nigeriaSpTore.Text = labeltext;
So it will be updated automagically
Thanks
I've set an array instead of a GI, but how can I add 3 Points? (not set 3 Points)
Quote
// script for Hotspot 1 (Hotspot 1): click at hotspot
Punkte[0] = 3;
Punkte[0] = Punkte[0] + 3;
Quote from: GarageGothic on Sun 13/08/2006 16:23:45
String labeltext = String.Format("%d", GetGlobalInt(7));
lblPoints.Text = labeltext;
Or just
lblPoints.Text = String.Format("%d", GetGlobalInt(7));
;)