错误:E0018 需要支架 - 需要帮助
Error: E0018 expected a bracket - need assistance
void RainbowSix::outlineEsp(bool enable) {
{
unsigned long pid = GetPID("RainbowSix.exe");
MODULEENTRY32 module = GetModule("RainbowSix.exe", pid);
HANDLE phandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
unsigned long long addr; //address
uintptr_t outlineComponent = getOutlineComponent();
if (GetAsyncKeyState(VK_F7));
WriteProcessMemory(phandle, (byte*)((unsigned long long)outlineComponent + 0x348); //Writting the address to the value of g
}
}
我不知道哪里需要它,有人可以帮助我,编码不是我的强项,但我理解其中的大部分,这真的让我感到沮丧。
对于给定的代码,这里缺少一个大括号:
WriteProcessMemory(phandle, (byte*)((unsigned long long)outlineComponent + 0x348);
您可以通过添加新行和缩进来可视化它:
WriteProcessMemory( // <---- no matching closing brace for that one.
phandle, (byte*)
(
(unsigned long long)outlineComponent + 0x348
);
如果你有一个IDE或一个好的编辑器,那么如果你在一个大括号以上,它们将突出显示相应的匹配大括号,这有助于找到缺失的大括号。
在 GetAsyncKeyState(( 调用后有一个 ";",应该删除它。 除此之外,您的 WriteProcessMemory 调用没有足够的参数,您缺少最后 3 个参数。
正确的代码应该如下所示:
void RainbowSix::outlineEsp(bool enable)
{
unsigned long pid = GetPID("RainbowSix.exe");
MODULEENTRY32 module = GetModule("RainbowSix.exe", pid);
HANDLE phandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
unsigned long long addr; //address
uintptr_t outlineComponent = getOutlineComponent();
if (GetAsyncKeyState(VK_F7) &1)
{
WriteProcessMemory(phandle, (byte*)((unsigned long long)outlineComponent + 0x348, lpBuffer, nSize, 0); //Writting the address to the value of g
}
}
lpBuffer 是您将从中写入数据的 src 缓冲区,nSize 应该是您要复制的字节数,最后一个参数的 0 忽略了可选的输出变量,该变量将接收成功写入的字节数。 您需要定义 lpBuffer 和 nSize 才能使此代码正常工作。
相关文章:
- 需要帮助在 c++ 中将字符串转换为字符 ----错误 "const char *" 类型的值不能用于初始化 "char" 类型的实体
- C++:需要帮助了解运算符重载错误
- C++ DLL 运行时错误"abc.dll is not a valid WIN32 application" 。请帮助解决这个问题
- 我需要帮助创建一个评分系统,但它一直给我一个错误,注释掉的整数是给我带来麻烦的部分
- 需要一些帮助来查找我的程序中的逻辑错误
- 我用C++做了一个计算器,但我对"type of calculator"的要求循环了两次。有人可以帮助指出我的错误吗?
- 霍纳斯定律需要代数帮助,显示错误的答案 c++
- 错误:E0018 需要支架 - 需要帮助
- 任何人都可以在带有JNI的Android Studio上帮助我解决此错误,是否缺少一些内容?
- 需要帮助修复分段错误(核心转储)
- 需要帮助识别简单多线程代码中的错误
- 函数和指针帮助:程序生成,但崩溃,没有任何特定错误
- 需要帮助以了解错误消息
- 功能错误中的表达语法帮助!C/C
- For-Loop帮助获得错误的输出
- 帮助错误 C2259:无法实例化抽象类
- 调试帮助:C++错误
- 链接器错误-请帮助:错误LNK2001:无法解决的外部符号
- OpenCV帮助-错误:没有匹配' operator[] '(操作数类型是' cv::Mat '和' int ').&l
- 投票程序CPP帮助(错误输出)