15 Jul, 2012, Koumintang wrote in the 1st comment:
Votes: 0
Ok, here is what I got. I installed the Account System Snippet into my SWR 1.0 [Modified] and now i get a bstr null error when loading ship files and planet files. The confusing part is, I didn't alter anything in these files when putting in the account code. But the error was not there before I installed the code( I checked the logs). This does not keep the game from running, and it doesn't keep anything from working but I would like it fixed.

SHIP ERROR:
Sun Jul 15 15:43:09 2012 :: Loading ships…
Sun Jul 15 15:43:09 2012 :: Str_cmp: null bstr.
str_cmp: astr: public bstr: (null)

This error happens will all ships not just ones that are owned. astr is the owner of the ship.

PLANET ERROR:
Sun Jul 15 16:13:35 2012 :: corellia
Sun Jul 15 16:13:35 2012 :: Str_cmp: null bstr.
str_cmp: astr: The Empire bstr: (null)

This error happens with only planets that have a governing clan.

Again i do not know why these came up when I installed the account code, I am doing this on a seperate port than my game, and the game has the exact same code running, only difference is the account code. I also have no way of knowing what part of the file is causing this… So any help at all will appriciated.
16 Jul, 2012, Nathan wrote in the 2nd comment:
Votes: 0
Hmm… sounds like there's some kind of ownership marker. Ships that "aren't owned" are probably owned by something (i.e. all ships have an ownership marker), but only planets that are owned have an ownership marker. Presumably, since str_cmp would be comparing strings (in C), then there is a string (bstr is the second of the two strings, hence 'string a' and 'string b') that is being compared to another string (duh, right? :) )

You can clearly see that here in one of your error messages (the planet one):

Quote


PLANET ERROR:
Sun Jul 15 16:13:35 2012 :: corellia
Sun Jul 15 16:13:35 2012 :: Str_cmp: null bstr.
str_cmp: astr: The Empire bstr: (null)



I assume this is the data somewhere:
Planet - name: corellia, owner: The Empire, …

The owner of the planet is "The Empire", maybe?, but whatever it's being compared to is null (null bstr meaning that the 'b string' is null), so you probably need to track down where this comparison is occurring and whether it's important. If it's unimportant, disable, other-wise if you can put an empty string in there without breaking anything, it might make the error go away, but you should make a note somewhere in case this is important for other parts of the account system functionality.

You might actually want to delve into the snippet and examine more closely, if you haven't already, to see what exactly it does.

** assuming this is this file: http://www.mudbytes.net/file-2647, it does says that it's alpha and intended for SWR1.3FUSS, so there might be some tweaks needed if you just plopped it in directly somewhere.
16 Jul, 2012, Nathan wrote in the 3rd comment:
Votes: 0
How does your game handle ownership of the planets and the ships, and does it have the same problem with all the ships? I assume that a simple account system would expect all characters to be tied to an account and thus any planet or ship would be expected to be owned by a character or maybe an account.

This may be a "bug" of sorts in the interaction between the codebase pre-snippet and the snippet itself.

You should probably check the code for loading the ship files and planet files for sure, and see where if anywhere, a string comparison is done.
16 Jul, 2012, Koumintang wrote in the 4th comment:
Votes: 0
Ok I've looked and look and looked, the file does absolutely nothing with the planets and the ships, nor did it change anywhere that saves the ships or planets. The planets are owned per clan, in their own seperate files, not by person, and the ships are owned by person in their own seperate files
16 Jul, 2012, Koumintang wrote in the 5th comment:
Votes: 0
ok problem fixed…. It had nothing to do with the account code at all… Since I do all my coding on a seperate port, I had to fix something about a month ago with setclan… In doing so I left one of my clans with no name (null) So when the code was comparing the ship/planet owner to the clans, because clans can own ships and govern planets, it was reading (null). Well about 6:11 yesterday I was fixing my put all command, cause it was causing a crash from some code I created to work with comlink freqs. I found the crash from a clan mob that puts all in a backpack. So i went to my dev port to find the issue… well the clan just so happened to be that (null) clan… so when i reset-up that clan the issue went away and I didn't even realize it. I was going through my logs this evening and thought i was going nuts because the errors where gone when I started working on it. A little research and I found the last thing I did before the errors where gone… Soooo that is how much of a tard I have been… thank you again for helping me find this ghost error, that wouldn't have even been there when i put the code into the main port. THANKS AGAIN!
0.0/5