Raised This Month: $ Target: $400
 0% 

[bug] format is acting VERY wierd


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 08-06-2005 , 14:40   [bug] format is acting VERY wierd
#1

i have this line
Code:
					len += format(menuBody[len], 511-len,"Gives you bonuses when you kill an enemy, these bonuses last for the specified time.^n^nRequires: Blood Lust , Level %d, %d point%s.^n^nNext level [%d] Lasts %.2f second%s, gain is %d%% of maxhealth upon kill, effects of primalscream upon kill, speed increases by %d%% upon kill.^n^n2. Buy %s^n^n0. Exit", HUNGERLEVEL, pointcost, pointcost > 1 ? "s" : "", upgrlevel, hungermaxtime, hungermaxtime == 1.0 ? "" : "s", HUNGERHEALTH, hungerspeed, upgrade_names[upgrade_choice[id]])
(5 tabs at the front)

upgrade_names is max 20 chars long

NOW the problem:
it get this error:
Code:
// F:\extralevels2_reworkdummy.sma(736) : error 075: input line too long (after substitutions)
// F:\extralevels2_reworkdummy.sma(737) : error 017: undefined symbol "upgrade_cho"
// F:\extralevels2_reworkdummy.sma(738) : warning 217: loose indentation
// F:\extralevels2_reworkdummy.sma(738) : error 017: undefined symbol "ice"
// F:\extralevels2_reworkdummy.sma(738) : warning 215: expression has no effect
// F:\extralevels2_reworkdummy.sma(738) : error 001: expected token: ";", but found "]"
// F:\extralevels2_reworkdummy.sma(738) : error 029: invalid expression, assumed zero
// F:\extralevels2_reworkdummy.sma(738) : fatal error 107: too many error messages on one line
the format above is line 737
736 is correct and when i comment that line he says 735...
738 is a closing "}" inside an IF

WHAT IS HAPPENING:
format starts at the very beginning of that line and counts 511 chars forward (1 tab = 1 space)
he ends at "upgrade_names[upgrade_cho" the "o" is char 510 and stops

but why is he counting variable name lenght ?

BUT NOW A MORE WIERD thing:
when i change string lenght to 1024 (inside format 1023)
i only get this error:
Code:
// F:\extralevels2_reworkdummy.sma(736) : error 075: input line too long (after substitutions)
any help ?
__________________
alias White Panther
karlos is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:20.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode