Jump to content

Recommended Posts

NULL is of type "pointer" bool is either true or false comparing them makes no sense..
how i solve it right now ?

questlua_petnew.cpp:135:12: error: invalid operands to binary expression
      ('nullptr_t' and 'int')
                if (NULL == petActor)
                    ~~~~ ^  ~~~~~~~~
questlua_petnew.cpp:155:12: error: invalid operands to binary expression
      ('nullptr_t' and 'int')
                if (NULL == petActor)
                    ~~~~ ^  ~~~~~~~~
questlua_petnew.cpp:174:12: error: invalid operands to binary expression
      ('nullptr_t' and 'int')
                if (NULL == pet_level)
                    ~~~~ ^  ~~~~~~~~~
questlua_petnew.cpp:194:12: error: invalid operands to binary expression
      ('nullptr_t' and 'int')
                if (NULL == pet_evo)
                    ~~~~ ^  ~~~~~~~
4 errors generated.
gmake: *** [Makefile:96: .obj/questlua_petnew.o] Error 1

questlua_petnew.cpp - https://pastebin.com/PAp4FNtU

Link to comment
https://metin2.dev/topic/21672-invalid-operands-to-binary-expression/
Share on other sites

  • Active Member

Am Bsp. von pet_evo erklärt.

Dein Compiler sagt ja, er kann nullpointer (NULL) nicht mit int (pet_evo) vergleichen.

Is ja auch richtig.

Als was is pet_evo definiert ?

int pet_evo = petSystem->GetEvolution();

Ah ein int. Was gibt GetEvolution zurück ?

DWORD            GetEvolution() { return m_dwevolution; }

Passt also auch :D

 

Was ist zu tun ?

if (0 == pet_evo)

 

  • Love 4

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.