Server Help

Bot Questions - Where is tell()?

(Deactived B l a h e r) - Sat Feb 18, 2006 4:33 pm
Post subject: Where is tell()?
I'm editing the rank.dll for MERVbot from Catid so it can support 26 ranks instead of just ten, and so it will anounce officer rank achivments instead of just the top rank. But when my compiler gets to spawn.cpp it can't find the tell() function to call. I'm using DEV-C++ if that helps at all. The files is attached if you want to see them.
Purge - Sat Feb 18, 2006 6:34 pm
Post subject:
I believe that's at the top of spawn.cpp... For the BotEvents, it is in dllcore.h.
(Deactived B l a h e r) - Sat Feb 18, 2006 6:38 pm
Post subject:
then it should have already named the tell() function out when it reached the the spawns.h, but why isn't the compiler picking it up? I think this compiler sucks.
Purge - Sat Feb 18, 2006 6:42 pm
Post subject:
Compiler isn't picking what up? Here's the definition:

Code: Show/Hide
void botInfo::tell(BotEvent &event)
{
   if (callback && handle)
   {
      event.handle = handle;
      callback(event);
   }
}

(Deactived B l a h e r) - Sat Feb 18, 2006 7:14 pm
Post subject:
633 C:\Blahertech.com\Programs\Rank\spawn.cpp no matching function for call to `botInfo::tell(BotEvent)'
note C:\Blahertech.com\Programs\Rank\spawn.cpp:161 candidates are: void botInfo::tell(BotEvent&)
Why is it giving me this crap then? icon_confused.gif
I'm sorry if this seems simple to you but, C++ enviroments are not my thing. The compiler also said int i wasn't going to go through the scope if it didn't go through the 'for (; i < NUM_RANKS;)' even though i starts at 0, so I had to use int i befor the two if{}'s that use them in line 68 instead of using 'for (int i = 0; i < NUM_RANKS; i++ )' after that line.
Purge - Sat Feb 18, 2006 7:51 pm
Post subject:
The for loop thing sounds like the same problem I've had. Trying switching compilers to this.
(Deactived B l a h e r) - Sat Feb 18, 2006 7:54 pm
Post subject:
Purge+ wrote:
The for loop thing sounds like the same problem I've had. Trying switching compilers to this.

Damn it I have dial up (4k-9k AOL). That takes me 3 days to dl. I already have it dled but now it fails to load the compiler now and I don't feel like paying $250 just to get a support call.
Muskrat - Sat Feb 18, 2006 9:32 pm
Post subject:
blah-er wrote:
I finally know C++ fully and under stand all the things you said I needed to "understand".


blah-er wrote:

I'm sorry if this seems simple to you but, C++ enviroments are not my thing. The compiler also said int i wasn't going to go through the scope if it didn't go through the 'for (; i < NUM_RANKS;)' even though i starts at 0, so I had to use int i befor the two if{}'s that use them in line 68 instead of using 'for (int i = 0; i < NUM_RANKS; i++ )' after that line.


Much of knowing C++ is actually getting it to work.
(Deactived B l a h e r) - Sun Feb 19, 2006 7:30 am
Post subject:
It still takes a while to understand the Debug enviroment. Besides the compiler is in BETA that's probably why it's getting confused on the scope of i not being intialized if it didn't go through the 'for' even though it will always go through the first time.
Cyan~Fire - Sun Feb 19, 2006 1:21 pm
Post subject:
It's not a beta problem. You just need to declare int i at the top of all functions with multiple for loops, but make sure to leave each definition in the loops.
Mr Ekted - Sun Feb 19, 2006 2:31 pm
Post subject:
blah-er wrote:
633 C:\Blahertech.com\Programs\Rank\spawn.cpp no matching function for call to `botInfo::tell(BotEvent)'
note C:\Blahertech.com\Programs\Rank\spawn.cpp:161 candidates are: void botInfo::tell(BotEvent&)
Why is it giving me this crap then? icon_confused.gif
I'm sorry if this seems simple to you but, C++ enviroments are not my thing. The compiler also said int i wasn't going to go through the scope if it didn't go through the 'for (; i < NUM_RANKS;)' even though i starts at 0, so I had to use int i befor the two if{}'s that use them in line 68 instead of using 'for (int i = 0; i < NUM_RANKS; i++ )' after that line.


Sounds like you don't, in fact, know what you are doing.
Muskrat - Sun Feb 19, 2006 2:38 pm
Post subject:
I'd suggest using the ide Purge linked and getting used to remedying its' error messages. There's a lot of support there and the errors are probably as clear as they will get anywhere.

Then learn what scope means.
(Deactived B l a h e r) - Sun Feb 19, 2006 4:25 pm
Post subject:
Mr Ekted wrote:
[..]



Sounds like you don't, in fact, know what you are doing.

stfu nobody asked you. Besides you're rather not make sense because that's the way you are, or your making fun of me with writing in english. The least you could do is help me so I do don't what I'm doing, so don't complain.
Solo Ace - Sun Feb 19, 2006 5:43 pm
Post subject:
He didn't make fun of your English or whatever, he just said what he thought, and I agree, it doesn't sound like you have any idea what you're doing, and you obviously don't.

You don't have to get mad or start being rude.
You did claim to know what you were doing, before.

Also, show a little more respect for the people who could potentially help you. You did, in fact, ask him and all the others on these forums.
(Deactived B l a h e r) - Sun Feb 19, 2006 5:54 pm
Post subject:
I didn't say I now know what I'm doing. I said I learned alot (functions, pointers, and members functions or classes.).
blah-er wrote:
I finally know C++ fully and under stand all the things you said I needed to "understand".

Opps maybe I did say that. Sorry, I said somthing I din't mean. Ected told me to learn about functions and how they worked, so I did. icon_sad.gif
Mr Ekted - Sun Feb 19, 2006 7:43 pm
Post subject:
I knew when you posted that first quote that you were lying. If you do not understand "int i;" then you are not ready to be compiling anything.
Cyan~Fire - Sun Feb 19, 2006 10:42 pm
Post subject:
But Ekted, you don't need to know C++ to make a MERVBot plugin. These days technology is so advanced that you can just copy+paste any necessary thought or knowledge!
Purge - Sun Feb 19, 2006 11:53 pm
Post subject:
Cyan~Fire wrote:
But Ekted, you don't need to know C++ to make a MERVBot plugin. These days technology is so advanced that you can just copy+paste any necessary thought or knowledge!


Unless you're working with SOS's .NET core. sa_tongue.gif
Mr Ekted - Mon Feb 20, 2006 12:40 am
Post subject:
Cyan~Fire wrote:
But Ekted, you don't need to know C++ to make a MERVBot plugin. These days technology is so advanced that you can just copy+paste any necessary thought or knowledge!


Sarcasm right? Sadly, that's what most bot people do these days. Paste code, keep tweaking until it compiles, then ship it.
Cancer+ - Mon Feb 20, 2006 5:17 am
Post subject:
Why should anyone help you blah-er? You come on here, spam shit and then ask for help? ARE YOU FUCKING RETARDED. You should be thanking these guys ALOT for trying to help you.
(Deactived B l a h e r) - Mon Feb 20, 2006 6:50 am
Post subject:
I understand what int i; is it's a intager that's used to count how many times it's looped. I dled the MS VS C++ 2005 and it works fine now so I have it built now. Yay, lets celibrate my idiocy and the first DLL project I made (edited and improved)! BTW Cancer+ calm down it's just text it's not like it's the end of the world. I'm still getting that start up error saying to contact my vendor to pay $250 for a support call though.
Microsoft Visual C++ 2005 Express Edition wrote:
The Visual Studio Explorers and Designers Package ({8D8529D3-625D-4496-8354-3DAD630ECC1B}) did not load because of previous errors. For assistance, contact the package vendor. To attempt to load this package again, type 'VCExpress /resetskippkgs' at the command prompt.

It dose it every time twice.
And now this one just popped up.
Microsoft Visual C++ 2005 Express Edition wrote:
The Visual Studio Common IDE Package ({6E87CFAD-6C05-4ADF-9CD7-3B7943875B7C}) did not load because of previous errors. For assistance, contact the package vendor. To attempt to load this package again, type 'VCExpress /resetskippkgs' at the command prompt.

Anyways I think I'm going to make it display pics on the top right corner (below the status bar thingy) of the screen showing your rank with marine patches.
Also thanks for all the help, I love you guys. icon_biggrin.gif
Mr Ekted - Mon Feb 20, 2006 1:58 pm
Post subject:
blah-er wrote:
I understand what int i; is it's a intager that's used to count how many times it's looped.


Let's go over this just for fun.

"int i;" tells the compiler that you would like to set aside 4 bytes of space to use as a signed integer value, and that you wish to refer to this location as "i". These 4 bytes of memory will exist as long as the scope in which they were declared exists, and can be accessed (as "i") throughout the scope in which they were declared.

"int i;" says nothing about loops or counters. "int i;" is no different from "int xylophone;"

There are 3 basic types of scope: data, stack, and heap.

When you declare "int i;" outside of a function (a public or static value), its space is set aside when the executable loads (DATA section) and exists until the executable unloads. What parts of your program that can access it is based on how it is declared. If you declare it simply by "int i;" then the compiler puts the variable name/location into the .obj file. The linker can then see this value. Other .obj's that refer to it will be "linked" to it directly. This is typically done by having a header file that declares it "extern int i;" If you declare it "static int i;" then the compiler will not place a reference to it in the .obj file. In effect its scope is only in the file it's declared in.

When you declare "int i;" in a function (or even inside nested braces in a function) space is made for that value at run-time when the function is called (STACK). When the function ends, the stack space used by the function for local data is "popped" and will be overwritten by the next function call. Refercing "i" outside the function (or braces where it's declared) will reference a different "i" or error.

If you delcare "int i;" as part of a structure (or even by itself) when you allocate memory, you are using the HEAP. The space for the value exists for as long as you want it to. The scope of the allocated data is based on how you decide to pass the pointers to it around.
(Deactived B l a h e r) - Mon Feb 20, 2006 3:58 pm
Post subject:
I know that i is a intager that uses 4 bytes of space, and I know all about public and global scopes. I was just saying on how i was used. But thank you anyways. icon_biggrin.gif
Cyan~Fire - Mon Feb 20, 2006 4:49 pm
Post subject:
But you don't even know how to spell integer. And it's not even just a programming term, either. Go away.

And it's funny that you repeated the one thing Ekted said that wasn't necessarily true. An 'int' is not always 4 bytes. Now as a quick test, what is always 4 bytes and when is 'int not?
Cerium - Mon Feb 20, 2006 5:06 pm
Post subject:
omg I know, I know!

bubble gum is always 4 bites.
int is not 4 bytes if you set it to -1.

<-- teh smartest hax0r
(Deactived B l a h e r) - Mon Feb 20, 2006 5:25 pm
Post subject:
or you use a "type" of it called double (or is it long)
Muskrat - Mon Feb 20, 2006 5:33 pm
Post subject:
Did you just say class? *snicker*
Mr Ekted - Mon Feb 20, 2006 5:54 pm
Post subject:
k, I'm done here icon_smile.gif
Bak - Mon Feb 20, 2006 6:26 pm
Post subject:
char[4]

unless it's Java then,

byte[4]
(Deactived B l a h e r) - Mon Feb 20, 2006 6:42 pm
Post subject:
Muskrat wrote:
Did you just say class? *snicker*

No, I didn't. lol.
Ekted please tell me your not bein sarrcastic, if not YAY sombody actullay believes me I read C++ For Dummies (well most of it, I'm not done).
D1st0rt - Tue Feb 21, 2006 12:55 am
Post subject:
That might be a little advanced for you, do you have any other books on it?
Cerium - Tue Feb 21, 2006 8:18 am
Post subject:
He should try "Visual Basic for the mentally handicapped" or "C++ in 21 years".
Cyan~Fire - Fri Feb 24, 2006 3:56 pm
Post subject:
It was probably sarcasm (sort of), blah-er, becuase you were wrong (both times?). Well, half-wrong on the second one, only a long is always four bytes, but you didn't answer the second half of the question so 1/4 rounds to 0. icon_razz.gif
D1st0rt - Fri Feb 24, 2006 4:56 pm
Post subject:
DWord. at least in 32bit iirc
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group