| View previous topic :: View next topic |
| Author |
Message |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Fri Apr 04, 2008 11:40 pm Post subject: C++ need some help |
|
|
hey guys, i'm working on my bot in C++, but i've got an error
my code is like this:
| Code: | void sendshit(INT key)
{
mswin = FindWindowW(L"MapleStoryClass", NULL);
lParam = MapVirtualKey(key,0);
lParam <<= 16;
PMX(mswin,WM_KEYDOWN,key,lParam);
Sleep(10);
PMX(mswin,WM_KEYUP,key,lParam);
}
bool AutoAttack(void) // Main code
{
for(;;) // Main loop
{
if (on == 1){
sendshit(0x45);
Sleep(300);
}
if (on == 0){
ExitThread(0);
}
}
return true;
}
bool HotKeys(void) // Main code
{
for(;;) // Main loop
{
Sleep(20);
if(GetAsyncKeyState(VK_F5) && (on == 0)) {
on = 1;
Edit_GetText(hWndAutoAttackDelay, AutoAttackDelayStr, 6);
AADelay = _ttoi(AutoAttackDelayStr);
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)&AutoAttack, 0, 0, 0);
Sleep(500);
}
if(GetAsyncKeyState(VK_F5) && (on == 1)) {
on = 0;
Sleep(500);
}
}
return true;
} |
got any ideas, i've got nothing
_________________
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat Apr 05, 2008 3:10 pm Post subject: |
|
|
Read the error, it says there was an error with: wcstol which I don't even see being used in the snippet of code you posted above. Mind posting the code that uses that function?
_________________
- Retired. |
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Apr 05, 2008 3:39 pm Post subject: |
|
|
| Also, you might want to use the _T or TEXT macro's instead of straight up 'L' unless you want to be bound to unicode.
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat Apr 05, 2008 3:52 pm Post subject: |
|
|
| slovach wrote: | | Also, you might want to use the _T or TEXT macro's instead of straight up 'L' unless you want to be bound to unicode. |
From the looks of it hes already bound to using Unicode as hes using all the unicode functions straight up instead of using the API macros.
_________________
- Retired. |
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Apr 05, 2008 4:01 pm Post subject: |
|
|
| Wiccaan wrote: | | slovach wrote: | | Also, you might want to use the _T or TEXT macro's instead of straight up 'L' unless you want to be bound to unicode. |
From the looks of it hes already bound to using Unicode as hes using all the unicode functions straight up instead of using the API macros. |
Oh geez, I glanced right over the W, heh
|
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Sat Apr 05, 2008 8:17 pm Post subject: |
|
|
yeh, using unicode, btw wicaan, i tried to check that but i have no idea what wcstol.c is, and the code on my 97th line is a comment
_________________
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat Apr 05, 2008 9:47 pm Post subject: |
|
|
The error was referring to the 97th line of the wcstol.c file. Don't look inside that file or edit it though it wont help you in the least bit lol.
Anyway, are you making any calls to:
strtol, wcstol, or _tcstol
And if not, debug your app and step through each line of code to see what line it is erroring on. If you compiled in debug mode, you should be able to debug it by clicking retry on that error box and looking at the call stack to see what called that function to cause the error.
_________________
- Retired. |
|
| Back to top |
|
 |
|