Interesting problem

08/11/2010 05:25 liljon50#1
I modified my database.cs the other day (Don't remember exactly what I did but it was some guide i was using not just me screwing around lol). So anyways now most of my chat commands don't work how they should. For example if I say /gw (guildwar won't start) but if i do /gw *insert any letter here* it will start even if i just put a space after the w which i completely don't understand how its working like that. Any help would be appreciated. where as a simple command such as /bi where teleports me somewhere I don't have that problem.
08/11/2010 08:31 Fish*#2
check ur chat.cs
for extra Cmd space check
08/11/2010 14:24 liljon50#3
Hmm. Can you explain a little bit more in depth what you are talking about? I don't exactly understand.
08/11/2010 23:54 _Emme_#4
Quote:
Originally Posted by liljon50 View Post
Hmm. Can you explain a little bit more in depth what you are talking about? I don't exactly understand.
See if there's any lenght check, such as "if (Cmd.Lenght > 1)"
08/12/2010 00:43 liljon50#5
Indeed that would be solution if it was only the problem with gw. It is not just gw it is half of my chat.cs commands. the more advanced ones such as

if (Cmd[0] == "/gw" && !Features.GuildWars.War)
Features.GuildWars.StartWar();

Compared to

if (Cmd[0] == "/bi")
{
GC.MyChar.Teleport(1015, 717, 576);
}

Basically any command that has && or ! in it isn't functioning right. It is an error in my database.cs as i said i was modifying the database.cs not chat.cs. chat.cs was completely fine until the database.cs was modified.
08/12/2010 03:59 _Emme_#6
Upload your entire Chat.cs here in order for us to have any idea of how to guide you.
08/12/2010 06:13 liljon50#7
I appreciate all your enthusiasm to try and help me but I can assure it is not my chat.cs as before my chat.cs worked fine. Until i added ban and checkban shit into my database.cs After that is when my chat commands got messed up by a space. I didn't change anything in the chat.cs and same chat.cs is working with a different source.

It is either with database.cs or DMap.cs as those are the two i changed before it stopped working.
08/12/2010 14:01 _Emme_#8
Then don't accept help, lol. In order for us to help you, we need to see the code, right? We don't know what you changed or whatnot.
08/13/2010 06:37 liljon50#9
add me on msn at [Only registered and activated users can see links. Click Here To Register...] please. I will send you my chat.cs there
08/13/2010 10:00 _Emme_#10
It's not like your source have anything special, trust me. If you want help from my part, upload it here.
08/14/2010 02:26 liljon50#11
Here
08/14/2010 02:57 bone-you#12
Quote:
Originally Posted by liljon50 View Post
Indeed that would be solution if it was only the problem with gw. It is not just gw it is half of my chat.cs commands. the more advanced ones such as

if (Cmd[0] == "/gw" && !Features.GuildWars.War)
Features.GuildWars.StartWar();

Compared to

if (Cmd[0] == "/bi")
{
GC.MyChar.Teleport(1015, 717, 576);
}

Basically any command that has && or ! in it isn't functioning right. It is an error in my database.cs as i said i was modifying the database.cs not chat.cs. chat.cs was completely fine until the database.cs was modified.
Are you absolutely 100% sure that Features.GuildWars.War is false when executing that command? If you debug and put a breakpoint there, is it false when it runs?
08/15/2010 17:40 liljon50#13
Yes it is false. The actual problem isn't with gw itself it is with other commands as well that typically involve the C.MyChar or !C or &&... Gw was just the example i used. /gw still works but i just need a space after the w for some odd reason if i am a PM. If I am a GM it works fine just typing it as it and hitting enter without the extra space after the w. It is something in my database or my dmaps. Most likely my database I'm thinking. I am highly doubting the actual issue is with the chat.cs but since he wanted me to upload it I did.
08/16/2010 11:49 Fish*#14
one thing u can do, is trying reset it for the changes u did.
08/17/2010 18:31 killersub#15
check if this
Code:
string[] Cmd = Message.Split(' ');
is in your chat.cs just AS I put it here...if it is make sure it has 1 SPACE and not 2 spaces or together...