x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

What #includes for GetNetMode() and appGetGameType()

Dear Friends at Epic,

Feedback: Probably the hardest thing I am encountering programming UE4 C++ is not being able to figure out what #includes to use to run the awesome functions that you have available.

I am still waiting for an answer on what #include I need for:

 WindowsPlatformMisc::ClipboardCopy()
 WindowsPlatformMisc::ClipboardPaste()

I spent hours trying to figure out what includes I needed on my own, with no success :)


I am also needing to know what #includes I need for GetNetMode() (engine.h) and appGetGameType (gametype.h)

none of the below will compile because the functions cannot be found.

Have these symbols been exposed to us Rocket users? (a Staff member used this phrasing with me regardnig a previous compile error of this nature)

 //alternate method
 ClientMessage(appGetGameType()->ToString());
     
     
 ENetMode theNetMode;
 
 theNetMode = GetNetMode(GetWorld());
     
     //Client?
     if (theNetMode == ENetMode::NM_Client)
     {
         ClientMessage("Net Mode >> This is a client!");
     }
     //Listen?
     else if (theNetMode == ENetMode::NM_ListenServer)
     {
         ClientMessage("Net Mode >> This is single player instance!");
     }
     //single?
     else if (theNetMode == ENetMode::NM_Standalone)
     {
         ClientMessage("Net Mode >> This is single player instance!");
     }

Thanks!

Rama

PS: as a side note, using getworld()->IsServer() does not provide accurate info regarding a NM_Standalone game,

this or condition passes even for a single player game instance

 UWorld * TheWorld = GetWorld();
 if (!TheWorld) return;
 if (TheWorld->IsClient() || TheWorld->IsServer())
 {
     //this code runs even for standalone games, why? its not a server or a client
 }
Product Version: Not Selected
Tags:
more ▼

asked Mar 11 '14 at 02:15 AM in C++ Programming

avatar image

ue4-archive ♦♦ STAFF
50k 3667 1996 9121

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hey Nathan,

Those functions should be accessible as long as you include the projects pre-compiled header in the cpp i.e. 'MyProjectName.h'

Looks like you are missing the F it should be:

FWindowsPlatformMisc::ClipboardCopy() FWindowsPlatformMisc::ClipboardPaste()

Best Regards,

Ryan

more ▼

answered Mar 11 '14 at 02:15 AM

avatar image

ue4-archive ♦♦ STAFF
50k 3667 1996 9121

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:15 AM

hee heee! you got it Ryan!

I figured this out only a couple of hours ago and posted in the other thread similar to this one that you also very helpfully answered for me.

thanks Ryan!

If I had not figured it out earlier you would have just solved it for me now

:)

Rama

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Well I figured out part of my question,

 GEngine->GetNetMode()

if any of you awesome Epic staff get the chance, please please just answer my questiona bout the clipboard :)

 WindowsPlatformMisc::ClipboardCopy()
 WindowsPlatformMisc::ClipboardPaste()
more ▼

answered Mar 11 '14 at 02:15 AM

avatar image

ue4-archive ♦♦ STAFF
50k 3667 1996 9121

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question