Forum > Coding >

[need help] thread undeclared identifier

Posts: 79

Threads: 13

Joined: Oct, 2018

Reputation: -6

Posted

Okay so i am trying to recreate queue_on_teleport and make it detect when u teleport using TeleportService but when i want it to go to the main function that does everything registering and stuff but my function is above it how can i make this work

 

I dont know how to correctly word this if u dont understand it just take a look at this picture

https://i.imgur.com/UIr91cx.png

 

  • 0

Posts: 1592

Threads: 166

Joined: Apr, 2021

Reputation: 13

Replied

int - stores integers (whole numbers), without decimals, such as 123 or -123. - w3schools.

 

you made an int function? shouldn't there be a "void" against int? anything else i dont have idea about.

just wanted to say that.

  • 0

Random quote here...

Posts: 79

Threads: 13

Joined: Oct, 2018

Reputation: -6

Replied

@VoidableMethod

its just to demonstrate, i just want to reference something 

  • 0

Posts: 0

Threads: 0

Joined: ?

Reputation:

Replied

You can put detectteleport() below thread(). Then declare detectteleport() before doing anything.

int detectteleport();

int thread()
{

}

int detectteleport()
{

}
  • 0

Added

@VoidableMethod ...what? You know there can be int functions right? They return an integer. You can also have string functions and bool functions or whatever. Each of them return their respective data type. Void functions just return nothing.

 

Example:

int intfunction()
{
return 3;
}

if (intfunction() == 3) // check if function returns 3
{
std::cout << intfunction(); // The output will be 3
}
else
{
std::cout << "It's not a 3 wtf";
}
  • 0

Users viewing this thread:

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