Thirds the charm, As i'm updated scripts i get new errors. Here's the deal again, jess i only two scripts to update now lol Here's the error line
Script 'Tons Of Addon's 6.1 Part 1' Line 1682: TypeError occured.
cannont convert nil into string
Here's the script's i use
Ton's Addons 6.1 P1
Ton's Addons 6.1 P2
Ton's Addons 6.1 P3
Stormtronics HE 5.2b
LvlUp Notifier 1.21
Letter by Letter Text 1.11
Night And Day 1.53
I get the error when i go into the menu and try to change the bar opacity from full.
Sarry for bugg the shit out of ye all. I'm not adding and new scripts or anything don't worry i just need to get these updated ones working as i'm half way though my game.
Treign
Check the link in my sig regarding script order, you might have placed them in the wrong order.
I reordered it like the sig but still i get the same error.
Treign
Try LvlUp Notifier 2.x.
Updated lvlup to 2.0 and still get the same error. :(
I'm thinking it as to do something with the bars. I never changed much on anything in the scripts except i added a couple windowskins i made, i added quest items, made the lenght of the change to day and night longer just the basic stuff. The only thing left to check is the letter by letter script and i cannot part with it. If i can't get it figured out i'm going to downgrade back down to the old versions that i never had any touble with. I'm going to recopy all the scripts back in to each as well and see if i may have accdently deleted something. Any ideas' would be nice, even somewhere to look would be good.
I just replaced all the scripts and started fresh still i cannot change the bar opicity without getting that error, heres the order i put them in
Letter by Letter Text 1.11
Ton's Addons 6.1 P1
Ton's Addons 6.1 P2
Ton's Addons 6.1 P3
Stormtronics HE 5.2b
LvlUp Notifier 2.0
Night And Day 1.53
I've no clue what to do from here. Cannot convert NIL it says. Would that mean it cannot change the opticity to nothing? Its on FULL when i start and i get no problems just when i goes to change it i gets this errror
Script 'Tons Of Addon's 6.1 Part 1' Line 1682: TypeError occured.
cannont convert nil into string
Here's the area is says is causing the problem AND i checked shaded text is set to false.
----------------------------------------------------------------------------
# draw_text
# x2 - x coordinate or rectangle
# y2 - y coordinate or text
# w2 - width or align
# h2 - height
# text2 - the text to be drawn
# a2 - align
# Added additional drawing to make the text look like shaded.
#----------------------------------------------------------------------------
alias draw_text_shaded_later draw_text
def draw_text(x2, y2, w2 = 0, h2 = 0, text2 = '', a2 = 0)
# set coordinates whether x2 is rectangle
if x2.is_a?(Rect)
x, y, w, h, text, a = x2.x, x2.y, x2.width, x2.height, y2, w2
else
x, y, w, h, text, a = x2, y2, w2, h2, text2, a2
end
# if active
if $game_system != nil && $game_system.SHADED_TEXT
# store font color
save_color = self.font.color.clone
# set font color to black
self.font.color = Color.new(0, 0, 0)
# draw shade
draw_text_shaded_later(x+1, y+1, w, h, text, a)
# restore font color
self.font.color = save_color
end
# draw normal text
draw_text_shaded_later(x, y, w, h, text, a) <<<<<<<THIS LINE>>>>>>>>
I think some other script is causing the problem. The thing is that the shaded text will catch the error from the other script when there's a problem with the text drawing. Completely delete the code of the shaded text add-on and run the game again. This time the script will point you to the actual place of the error.
Ok i totally removed that section, and ran the game then i went to change the bar thing again and this is where it pointed, it was the same error cept at the line below in the stormtronics script
def draw_opacity(x, y, width = 224)
alpha = case $game_system.bar_opacity
when 0 then 'No Bar'
when 1..63 then 'Light'
when 64..127 then 'Medium'
when 128..191 then 'Hard'
when 192..255 then 'Full'
end
self.contents.draw_text(x, y + 13, 224, 32, alpha, 1)<<<<<<<<<THIS LINE>>>>>
any ideas?
Aaaahhhh, now I get it. For some reason a value is not initialized. Before this line here:
alpha = case $game_system.bar_opacity
add this:
if !$game_system.bar_opacity.is_a?(Numeric) || !$game_system.bar_opacity.between?(0, 255)
$game_system.bar_opacity = 0
end
This will fix your problem and you can put back the shaded text code.
This value actually should have been initialized judging by the code. =/ Might be some conflict.
Yeah.....that didn't work. Here's what it looked like
def draw_opacity(x, y, width = 224)
if !$game_system.bar_opacity.is_a?(Numeric) || !$game_system.bar_opacity.between?(0, 255)
$game_system.bar_opacity = 0
alpha = case $game_system.bar_opacity
when 0 then 'No Bar'
when 1..63 then 'Light'
when 64..127 then 'Medium'
when 128..191 then 'Hard'
when 192..255 then 'Full'
end
self.contents.draw_text(x, y + 13, 224, 32, alpha, 1)
end
I'm just going to switch back all my scripts to the older ones that work for me. Prolly shoudln't have updated anyways. Thanks for you help though. I got a new error soon as i ran it like that, oddly enough it pointed to the end of the stormtronics script, so i decided to type "end" there for shits, and the game booted and soon as i went to go in my menu it crashed again. Thanks guys appriciated your time.
Oddly enough it runs fine with these scripts.
Letter by Letter Text 1.11
Ton's Addons 4.7b
Stormtronics 4.4b
Night And Day 1.53
LvlUp Notifier 2.0
I think you prorbably might need to remove the end you typed and type end at the bottom of the draw_opacity method.
Quote from: Blizzard on February 25, 2008, 07:19:43 am
if !$game_system.bar_opacity.is_a?(Numeric) || !$game_system.bar_opacity.between?(0, 255)
$game_system.bar_opacity = 0
end
I think you are missing an end... (-_-') It should be:
def draw_opacity(x, y, width = 224)
if !$game_system.bar_opacity.is_a?(Numeric) || !$game_system.bar_opacity.between?(0, 255)
$game_system.bar_opacity = 0
end
alpha = case $game_system.bar_opacity
when 0 then 'No Bar'
when 1..63 then 'Light'
when 64..127 then 'Medium'
when 128..191 then 'Hard'
when 192..255 then 'Full'
end
self.contents.draw_text(x, y + 13, 224, 32, alpha, 1)
end
I think you are right LOL, When i copied what you told me i never got that end didn't see the scroll down. Man, scripts shouldn't be so tedious. LOL I may try it again but for now i'm going to stick with these older scripts. They work and i want to bug test the game and stuff. I will try again later but i need to add to it now, i only have a couple more levels to do and then the polishing will take place. Thanks blizz i'm very confident i missed that END. LOL Ill come back to this post when i'm ready to try it again.