|
7 registered members (TipmyPip, Martin_HH, Volkovstudio, AndrewAMD, JMMAC, Grant, 1 invisible),
5,432
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Digits() error
[Re: Knuckles]
#146850
08/09/07 22:37
08/09/07 22:37
|
Joined: Mar 2006
Posts: 752 Portugal
demiGod
User
|
User
Joined: Mar 2006
Posts: 752
Portugal
|
Please, just do it like i told you, it works, ok ? Code:
var HP = 0; var SP = 1; var playerstats[2]; var playerstats_level_01[2] = 40, 20;
// in function main put this: playerstats[HP] = playerstats_level_01[HP]; playerstats[SP] = playerstats_level_01[SP];
// and now the panel panel player_stats_window { layer = 1; bmap = stats_bg; pos_x = 15; pos_y = 500; digits(150,55,"PlayerStats: %.3f",*,1,playerstats[1]); flags = refresh,d3d,visible; }
|
|
|
Re: Digits() error
[Re: Knuckles]
#146852
08/10/07 04:36
08/10/07 04:36
|
Joined: Jul 2006
Posts: 91 Florida, USA
Knuckles
OP
Junior Member
|
OP
Junior Member
Joined: Jul 2006
Posts: 91
Florida, USA
|
okay, now it's getting even weirder... I've been at this for hours now trying to figure it out. I deleted the playerstats[1] in the digits() function and replaced it with 'asdf' and the program ran! but there was just a zero there. The weird thing is that I did not define anything named 'asdf' anywhere in my program yet it still ran! Code:
digits(30,30,"HP %.0f",standard_font,1,asdf);
That's what I put and the program ran without me even having to define 'asdf.' Is this a bug or something? how is it that I don't get errors with something undefined, yet, I get errors with the playerstats[1] array?
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|