0 registered members (),
1,089
guests, and 10
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Digits() error
#146840
08/08/07 21:46
08/08/07 21:46
|
Joined: Jul 2006
Posts: 91 Florida, USA
Knuckles
OP
Junior Member
|
OP
Junior Member
Joined: Jul 2006
Posts: 91
Florida, USA
|
What am I doing wrong here? I'm trying to display a player's HP and SP on the screen using digits(): Code:
var HP = 0; var SP = 1;
var playerstats[2]; var playerstats_level_01[2] = 40, 20;
playerstats[HP] = playerstats_level_01[HP]; playerstats[SP] = playerstats_level_01[SP];
panel player_stats_window { layer = 1; bmap = stats_bg; pos_x = 15; pos_y = 500; digits = 150,55,1,standard_font,1,playerstats[1]; flags = refresh,d3d; }
string player_stats_string = "HP \n\nSP \n";
text player_stats_text { layer = 2; pos_x = 75; pos_y = 550; font = standard_font; strings = 1; string = player_stats_string; }
player_stats_window.visible = on; player_stats_text.visible = on;
When I try to run the program I get an error that says there's "Too many parameters" for the line that has: digits = 120,48,1,standard_font,1,playerstats[1]; The arrow is pointing to the [1] in playerstats. I'm not sure why...
Last edited by Knuckles; 08/09/07 02:03.
|
|
|
Re: Digits() error
[Re: Knuckles]
#146845
08/09/07 04:26
08/09/07 04:26
|
Joined: Sep 2002
Posts: 700 Orange County, CA
LogantheHogan
Developer
|
Developer
Joined: Sep 2002
Posts: 700
Orange County, CA
|
Hmm. My only thought would be to reorganize the digits definition into proper syntax, i.e. digits(120,48,1,standard_font,1,playerstats[1]);. Let me know if that works, if not tell me and I'll switch my brain to high powered debugging mode and take another look.
also, you don't have to display a separate text as well as the panel. Look in the manual for info on how to display text inside a digits element.
|
|
|
Re: Digits() error
[Re: demiGod]
#146849
08/09/07 21:58
08/09/07 21:58
|
Joined: Jul 2006
Posts: 91 Florida, USA
Knuckles
OP
Junior Member
|
OP
Junior Member
Joined: Jul 2006
Posts: 91
Florida, USA
|
It's still saying 'too many parameters' and pointing to the '1' in [1]
Last edited by Knuckles; 08/09/07 22:00.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|