Categories > Coding > C++ >
[Q] Error "expected an identifier"
Posted
Hey,
I've been trying to update a dll and I just copied things from mellon's pastebin and pasted it in the addresses. what did I do wrong and how can I fix it? lines where the error shows:
static constexpr auto R_LUA_TNIL = 0;
static constexpr auto R_LUA_TBOOLEAN = 3;
static constexpr auto R_LUA_TNUMBER = 1;
static constexpr auto R_LUA_TLIGHTUSERDATA = 4;
static constexpr auto R_LUA_TTABLE = 8;
static constexpr auto R_LUA_TSTRING = 5;
static constexpr auto R_LUA_TFUNCTION = 7;
static constexpr auto R_LUA_TTHREAD = 9;
static constexpr auto R_LUA_TUSERDATA = 6;
static constexpr auto R_LUA_TPROTO = 10;
Full line:
static constexpr auto R_LUA_TNONE = -1;
static constexpr auto R_LUA_TNIL = 0;
static constexpr auto R_LUA_TVECTOR = 2;
static constexpr auto R_LUA_TBOOLEAN = 3;
static constexpr auto R_LUA_TNUMBER = 1;
static constexpr auto R_LUA_TLIGHTUSERDATA = 4;
static constexpr auto R_LUA_TTABLE = 8;
static constexpr auto R_LUA_TSTRING = 5;
static constexpr auto R_LUA_TFUNCTION = 7;
static constexpr auto R_LUA_TTHREAD = 9;
static constexpr auto R_LUA_TDEADKEY = 12;
static constexpr auto R_LUA_TUSERDATA = 6;
static constexpr auto R_LUA_TUPVAL = 11;
static constexpr auto R_LUA_TPROTO = 10;
I'm not trying to skid / release this as my own. I'm just doing this for learning purposes. Don't be rude.
Added
@boyke you might take me as a skid or something that I shouldn't use it, but axon...
Cancel
Post
Added
@boyke could you give me an example how to do that?
edit: wait should it be something like
#define R_LUA_TUPVAL = 11;
Cancel
Post
Added
edit of edit:
now it gave me errors
code that it errors in:
std::uintptr_t RBX_LuaState(const std::uintptr_t i) { return (i + 276) - *reinterpret_cast<const std::uintptr_t*>(i + 276); }
errors:
RBX_LuaState - cannot overload functions distinguished by return type alone
uintptr_t - identifier "t" is undefined
uintptr_t - namespace "std" has no member for "uintptr_"
Cancel
Post
Added
@boyke maybe try dming me on nertivia (as i can use it only) and we'll fix it there tomorrow?
iComet:3221
Cancel
Post
Random quote here...
Replied
You can't just update addresses and expect it to work anyways. And about your problem, there are so many things that can possibly cause that error that I don't even know where to start.
Cancel
Post
Replied
@boyke whether or not it's a macro has nothing to do with it.
OP just got it wrong, there's nothing wrong with the code he thinks is erroring besides the fact that it's trash.
The real error is right above those declarations.
Cancel
Post
Added
@VoidableMethod At the top of your file do `#include <cstdint>` and `#include <cstddef>`
Cancel
Post
Replied
@0x90 That still errors me
identifier "r_luad_pcall" is undefined
identifier "r_luad_pcall" is undefined
Code:
((((DWORD*)exceptionChain[0])[1]) != NULL );
{
DWORD nextUnk = ((DWORD*)exceptionChain[0])[1];
fakeChain(exceptionChain);
int ret = r_luad_pcall(rL, nargs, nresults, errfunc);
restoreChain(exceptionChain, unk, nextUnk);
return ret;
}
fakeChain(exceptionChain);
int ret = r_luad_pcall(rL, nargs, nresults, errfunc);
// Both r_luad_pcall are erroring
Cancel
Post
Random quote here...
Replied
axon is kinda broken, you'll need some tweeks to get it working
(Im assuming ur using vanilla axon)
Cancel
Post
!ฅ^•ﻌ•^ฅ!#3317
Anime enthusiast
Random quote here...
Replied
i dont do much c++ as it is the difficulty as setting my hair on fire and trying to put it out using more gasoline
Cancel
Post
!ฅ^•ﻌ•^ฅ!#3317
Anime enthusiast
Users viewing this thread:
( Members: 0, Guests: 3, Total: 3 )
Cancel
Post