Please Log in or Create an account to join the conversation.
zusuk wrote: Oh wow I think i just misunderstood your whole post
So yeah if you are changing the numeric fields (that big stack of numbers) you'll have to add some code to convert between the two different file formats I believe
My guess is that your line with the two values you have tagged on their, your load code is lookign for an index value (one of the letters) but is just getting those two obj_socket_min/max values
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
zusuk wrote: i mean i'm definitely not the best person to ask for the ideal way to do it...
with that warning, i assume your code is looking for two values right? gets to a single letter instead... interprets that as your whole search for your numeric args.. then the next line of code is your field value minus the letter.. example:Code:#1 wings~ a pair of wings~ A pair of wings is sitting here.~ ~ 9 0 0 0 0 ae 0 0 0 0 0 0 0 6 0 0 0 1 1 0 0 0 G <------ Retval of 1 here, G is placed as your socket_min 0 <--- code is expecting a field letter here, gets number.. gives error H 0
i guess the easy-cheesy way out is to check first if a letter is coming next (after numeric arg 3) that is valid, if it is.. then just set some default values for your sockets and move on.. but if a letter doesn't come after, then assume its your numeric arg 4 and handle it
probably a much more eloquent way to deal with it but that's how i'd do it.. you basically just make your code handle both file formats that way
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
zusuk wrote: 'b' is no longer in the formula for what i'm suggesting... one of two scenarios are happening if you have a valid object file after the 3rd numeric arg
1) it has a letter or # sign (and is not a 'green lantern' version of the object file
2) it has a 4th numeric arg (green lantern version)
if (1), set your default values for your socket thingies
if (2), set numeric arg 4 as values for your socket thingies
you dig? you're just making it handle either scenario
now i'm not claiming this is the best way to do it.. or even a good way, its just the way i'd do it
Please Log in or Create an account to join the conversation.
tbaMUD © 2024