Server Help

Bot Questions - Problem

Anonymous - Thu Dec 13, 2007 10:27 pm
Post subject: Problem
Hello,


I just need help with fixing an error problem I get when compiling flag.dll. I get this error with no changes being mad to the code.

Code: Show/Hide
Warning   1   warning C4996: 'strncpy' was declared deprecated   c:\documents and settings\d.....\mervbot\src\player.cpp   108
Warning   2   warning C4996: 'strncpy' was declared deprecated   c:\documents and settings\d......\mervbot\src\player.cpp   109
Error   3   error C2664: 'GetCurrentDirectoryW' : cannot convert parameter 2 from 'char [512]' to 'LPWSTR'   c:\documents and settings\.....\mervbot\src\flag2\spawn.cpp   53



It basically does that for 48 times for different lines. Anyways, if anyone can help I'd really appreciate it.
Solo Ace - Fri Dec 14, 2007 2:52 am
Post subject:
Solution
k0zy - Fri Dec 14, 2007 4:11 am
Post subject:
The problem is that MERVBot is was written for ANSI and you're trying to compile it for UNICODE.

The possible solutions are:
- Use an older compiler
- Change every GetCurrentDirectory / GetCurrentDirectoryW to GetCurrentDirectoryA
- Tell your compiler to use ANSI (I don't know how though)
Anonymous - Fri Dec 14, 2007 11:54 am
Post subject:
Thanks Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole.... that did the trick. However, I still have 7 errors while compiling:

Code: Show/Hide

Error   4   error C2065: 'i' : undeclared identifier   c:\documents and settings\....\mervbot\src\flag2\spawn.cpp   439
Error   5   error C2228: left of '.len' must have class/struct/union   c:\documents and settings\....\mervbot\src\flag2\spawn.cpp   485
Error   6   error C2228: left of '.len' must have class/struct/union   c:\documents and settings\....\mervbot\src\flag2\spawn.cpp   486
Error   7   error C2228: left of '.len' must have class/struct/union   c:\documents and settings\....\mervbot\src\flag2\spawn.cpp   509
Error   8   error C2228: left of '.len' must have class/struct/union   c:\documents and settings\....\mervbot\src\flag2\spawn.cpp   510
Error   9   error C2228: left of '.lfill' must have class/struct/union   c:\documents and settings\...\mervbot\src\flag2\spawn.cpp   512
Error   10   error C2228: left of '.lfill' must have class/struct/union   c:\documents and settings\....\mervbot\src\flag2\spawn.cpp   592



These error's were there before and once again I haven't made any changes yet to the source. Any ideas?


Thanks
tcsoccerman - Fri Dec 14, 2007 4:19 pm
Post subject:
i see a kozy, but not a Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole.... ?
Anonymous - Fri Dec 14, 2007 4:43 pm
Post subject:
Yeah, I said Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole.... but for some reason that got altered when i posted.
k0zy - Fri Dec 14, 2007 7:15 pm
Post subject:
That's mgbs punishment for using my own nick too often.

Could you paste some lines that contain errors?

The undeclared identifer should be easy to fix... just add "int" to the i in every for loop where it is missing.
The block scope of the for loop changed between versions.
baseball43v3r - Fri Dec 14, 2007 8:38 pm
Post subject:
kozy

Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole....


edit::ah i see this is hardcoded
Cheese - Thu Dec 20, 2007 3:53 pm
Post subject:
kozy
Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole....

-edit- lol mgb leaves footprints everywhere
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group