Categories > Coding > C++ >

[Q] Error "expected an identifier"

Posts: 1995

Threads: 198

Joined: Apr, 2021

Reputation: 13

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.

 

  • 0

Added

@boyke expected an identifier, that's what it says

  • 0

Added

@boyke you might take me as a skid or something that I shouldn't use it, but axon...

  • 0

Added

@boyke could you give me an example how to do that?
edit: wait should it be something like

 

#define R_LUA_TUPVAL = 11;
  • 0

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_"

  • 0

Added

@boyke maybe try dming me on nertivia (as i can use it only) and we'll fix it there tomorrow?

iComet:3221

  • 0

Random quote here...

Posts: 0

Threads: 0

Joined: ?

Reputation:

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.

  • 0

Added

@VoidableMethod

#define R_LUA_TUPVAL 11
  • 0

0x90

dingleberry#2286

vip

Posts: 248

Threads: 26

Joined: Dec, 2020

Reputation: 27

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.

  • 0

Added

@VoidableMethod At the top of your file do `#include <cstdint>` and `#include <cstddef>`

 

  • 0

Added

@63568 read the reply I gave to @boyke if you want to see the issue

  • 0

Posts: 1995

Threads: 198

Joined: Apr, 2021

Reputation: 13

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
  • 0

Random quote here...

Oofed

Fujiwara Chika

Posts: 100

Threads: 2

Joined: Aug, 2019

Reputation: 1

Replied

axon is kinda broken, you'll need some tweeks to get it working

(Im assuming ur using vanilla axon)

  • 0

!ฅ^•ﻌ•^ฅ!#3317

Anime enthusiast

Posts: 1995

Threads: 198

Joined: Apr, 2021

Reputation: 13

Replied

@Oofed could you help me with them somehow?

  • 0

Random quote here...

Oofed

Fujiwara Chika

Posts: 100

Threads: 2

Joined: Aug, 2019

Reputation: 1

Replied

@VoidableMethod

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

  • 0

!ฅ^•ﻌ•^ฅ!#3317

Anime enthusiast

Next >>>

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )