Welcome to the Builder Academy

Question Question.

More
14 Nov 2012 21:36 #1050 by zusuk
Replied by zusuk on topic Re: Question.
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

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

More
14 Nov 2012 21:49 #1051 by Liko
Replied by Liko on topic Re: Question.

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


Well its only having a problem with .obj files already defined. Any new .obj has no problem. Hence why Green Lantern Mud had no issue like this is because I have no mob or objects and when I create an object it saves and loads successfully. I need to know how to program it so that if its missing the line it sets it default to 0 0

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

More
14 Nov 2012 22:04 #1052 by zusuk
Replied by zusuk on topic Re: Question.
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 :P but that's how i'd do it.. you basically just make your code handle both file formats that way

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

More
14 Nov 2012 22:25 #1053 by Liko
Replied by Liko on topic Re: Question.

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 :P but that's how i'd do it.. you basically just make your code handle both file formats that way


Well B is only going to show up when it has SOCKET_APPLIES

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

More
14 Nov 2012 22:39 #1054 by zusuk
Replied by zusuk on topic Re: Question.
'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 :P

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

More
14 Nov 2012 23:27 #1055 by Liko
Replied by Liko on topic Re: Question.

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 :P


I know, but your not getting what I'm saying. "B" wouldn't cause it to crash. It's like E and A they are only set when the proper applies are set to the file. So when the object doesn't have them, they are left out of the .obj file. Thats why it's confusing. On the 4th line its putting letter E instead of 0 0

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

Time to create page: 0.492 seconds