MySql Execute : index was outside the bounds of the array at C#
Discussion on MySql Execute : index was outside the bounds of the array at C# within the CO2 Private Server forum part of the Conquer Online 2 category.
dude the problem is very expectable now ..the error is in eC.Name .. and the problem is that the Database Cant Save this Name as its string type isnt supported in database .. go to entities Table then Design Table .. then check Name column and make sure that its type is varchar , Character Set is utf8 , and Collation is utf8_general_ci then Debug and see
tried as you said and got null error at
Code:
var rdr = new MySqlReader(new MySqlCommand(MySqlCommandType.SELECT).Select("cq_user").Where("name", eC.CharacterName));
Quote:
Originally Posted by 'Emil
Why are you passing ec.CharacterName/Class to the insert, when you already populated the client.entity variables for this? Other than that the code looks fine as far as I can tell, but then again I haven't touched a source in like forever so I can't remember if the name has an encryption on it directly from the packet.
the problem seems from the packet 1001 itself .. make sure you are using the correct method to get the name u Entered it should be like that
Code:
Name = Encoding.Default.GetString(buffer, 24, 16).Replace("\0", "");
Quote:
Originally Posted by go for it
true what's 'emil said at not changing the type at db because it won't solve the wrong name you are getting
and shadowman123 is right aswell about the encoding, it could be anything from cryptography to encoding
client.Entity.Name = eC.CharacterName;
check its Value Through Either BreakPoint Or Console and see if its = to the name u entered in Entity Create Page
client.Entity.Name = eC.CharacterName;
check its Value Through Either BreakPoint Or Console and see if its = to the name u entered in Entity Create Page
keep sending me this null error i captured it print screen to show you break point .. Actually i am getting suck of this problem .. isn't going to be fixed ?
at first it was about MySql Execute : index was outside the bounds of the array at C#
now its about it + this null error .. but its came after i edited Name Column in data base so i restored the old one but same null error O.o
first thing to do, go to your database and get me a picture of it's structure of that table, so i can think of why that query is returning a null
and basically it's because it can't define the rdr object, that could be anything but it's most likely to be you trying to access a non existing column in this database
so make sure that "cq_user" exist with this name with case sensitive
and that "Name" is there with the exact name with case sensitive too !
cool you found the first problem, go back to the project and fix that strings
then you are back to have 1 problem (which i duno what cause it)
keep sending me this null error i captured it print screen to show you break point .. Actually i am getting suck of this problem .. isn't going to be fixed ?
at first it was about MySql Execute : index was outside the bounds of the array at C#
now its about it + this null error .. but its came after i edited Name Column in data base so i restored the old one but same null error O.o
Dude you are doing BreakPointing in wrong way ... u just BreakPoint the Variable which u would like to know its value ...
2nd MysqlReader will alawys Be Null no wounder cuz the eC.Name hasnt been saved in database so it will never be able to read smthing that doesnt Exit ...
do this easy Code
Code:
Consile.WriteLine(client.Entity.Name);
and see what u will get btw the Mysql Wrapper is Pathetic and needs Modification as Super Aids said .. the connection stays open when reading , Executing smthing Which is Useless and Wrong ... anyways give me the Result asap
Dude you are doing BreakPointing in wrong way ... u just BreakPoint the Variable which u would like to know its value ...
2nd MysqlReader will alawys Be Null no wounder cuz the eC.Name hasnt been saved in database so it will never be able to read smthing that doesnt Exit ...
do this easy Code
Code:
Consile.WriteLine(client.Entity.Name);
and see what u will get btw the Mysql Wrapper is Pathetic and needs Modification as Super Aids said .. the connection stays open when reading , Executing smthing Which is Useless and Wrong ... anyways give me the Result asap
The .execute calls whatever problems you mean, the mysql query builder is fine.
Why do console.write? We should be encouraging breakpointing as much as we can people in this community don't know what it is for the most part.
The .execute calls whatever problems you mean, the mysql query builder is fine.
Why do console.write? We should be encouraging breakpointing as much as we can people in this community don't know what it is for the most part.
to be Honest i h8 BreakPointing and i prefer using Try and catch with showing the Error in console .. cuz its Faster than doing breakpoints in giving results
Quote:
Originally Posted by abdeen
Note : inserted name was Sexy^*****
we made good progress till now cuz we have known that the problem is in eC.Name ..
to be Honest i h8 BreakPointing and i prefer using Try and catch with showing the Error in console .. cuz its Faster than doing breakpoints in giving results
we made good progress till now cuz we have known that the problem is in eC.Name ..
well am very happy now , we have known the problem is in eC.Name may i say ( lwlwlwlwlwllwlwlwywyyyyyy ) jk
any suggestion about how to fix this problem ?
any new way for encrypt or decrypt the character name ? you see what i got when i inserted Sexy^***** as a character name O.o
to be Honest i h8 BreakPointing and i prefer using Try and catch with showing the Error in console .. cuz its Faster than doing breakpoints in giving results
we made good progress till now cuz we have known that the problem is in eC.Name ..
Regardless, what about bugs that dont throw errors? Would you just put out a ton of console.write?
I'm thinking you don't know how to step/use breakpoints because otherwise theres no way you would be bashing them, they're a developers best friend.
Array auf Negativen Index-Zugriff checken? 04/25/2013 - C/C++ - 6 Replies Hey,
Bin grade dabei in c++ Conways Game of Life zu coden zum training,
nun wollte ich den Check auf Nachbar-Zellen machen, jedoch crasht das Game
zu Beginn wenn man als Start-Zelle im Check nen zu geringen Wert hat.
Beispiel ums genauer zu erläutern ->
int mapsize=6; //Spielfeldgröße.. 6x6 Spielfeld
int map;
int nachbar_oben = map; //Zelle über der Zelle an "position"
[Help]Albetros MYSQL execute errors 12/22/2012 - CO2 Private Server - 11 Replies I have some errors on that source can some1 help me please?
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'skip,1;
END
;
-- ----------------------------
-- Procedure structure for' at line 5
INSERT INTO spellinfo VALUES ('10359', '30010', 'IceBolt', '0036', '0', '0', '0', '0004', '0000', '0000', '120', '0000', '0100', '0000', '0008', '0020', '0000', '0000', '0', '0000', '0', '0000',...
LUA I/O & mysql (via os.execute) 10/12/2011 - Metin2 PServer Guides & Strategies - 26 Replies Hallo =)
Ich will hier mal was hoffentlich neues Releasen, dass für große Server recht interessant ist..
Ich habe von einiger Zeit mal nach Möglichkeiten gesucht, um bestimmte Daten die in einer Quest benutzt werden woanders als in in der Quest-Tabelle speichern zu lassen? Warum?
Ganz einfach: Wenn ich jetzt etwas auslesen will also z.B. bei einem 2 sprachigen Server muss man ja irgendwo abspeichern, welche Sprache der user hat..
Das kann man ja ganz normal per setqf machen..
Aber wenn ich...