Jump to content

[Fixed] Computer+ API check crashing


Vaskulis

Recommended Posts

Hey there, I'm having a problem getting the Computer+ API to work.
Specifically the check wether the player is running Computer+ or not. I have followed Albo's guide to the letter and still I get the following error whenever my callout's OnBeforeCalloutDisplay overload gets called while the player does NOT have Computer+ installed:

[13.03.2017 00:34:16.933] LSPD First Response: 
[13.03.2017 00:34:16.934] LSPD First Response: ==============================
[13.03.2017 00:34:16.934] LSPD First Response: UNHANDLED EXCEPTION DURING GAME FIBER TICK
[13.03.2017 00:34:16.934] LSPD First Response: ------------------------------
[13.03.2017 00:34:16.935] LSPD First Response: Origin: Game fiber "CalloutManager".
[13.03.2017 00:34:16.935] LSPD First Response: ------------------------------
[13.03.2017 00:34:16.935] LSPD First Response: Exception type: System.IO.FileNotFoundException
[13.03.2017 00:34:16.936] LSPD First Response: Exception message: Die Datei oder Assembly "ComputerPlus, Version=1.3.4.4, Culture=neutral, PublicKeyToken=null" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
[13.03.2017 00:34:16.936] LSPD First Response: ------------------------------
[13.03.2017 00:34:16.937] LSPD First Response: Inner exceptions:
[13.03.2017 00:34:16.937] LSPD First Response: ------------------------------
[13.03.2017 00:34:16.937] LSPD First Response: Stack trace:
[13.03.2017 00:34:16.938] LSPD First Response: bei GangsOfSouthLS.Callouts.DrugDeal.OnBeforeCalloutDisplayed()
[13.03.2017 00:34:16.938] bei ?????????????????????????????????????????.?????????????????????????????????????????(Callout ) in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\CalloutManager.cs:Zeile 254.
[13.03.2017 00:34:16.938] bei ?????????????????????????????????????????.?????????????????????????????????????????(Type ) in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\CalloutManager.cs:Zeile 237.
[13.03.2017 00:34:16.939] bei ?????????????????????????????????????????.?????????????????????????????????????????() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\CalloutManager.cs:Zeile 134.

There are a few reasons why I think it might be something wrong with Computer+, so please correct me if I'm wrong. I've been looking for errors in my code for hours now.

First off, I'm also using the LSPDFR+ API for which I use the same dependency check code, and it's working fine. Secondly, the minimal version number I'm checking for is 1.3.4.4 and not 1.3.0.0.
Also, it doesn't seem to matter if I even check for Computer+. If it's not there, the plugin will crash as soon as OnBeforeCalloutDisplayed gets called, which, again, doesn't happen with LSPDFR+.

Edited by Vaskulis
Link to comment
Share on other sites

Are you able to share the code for the Computer+ integration wrapper class you have?

 

Do you have any references to ComputerPlus or ComputerPlus.API anywhere other than in the wrapper class?

 

It sounds like there is a reference to the ComputerPlus or ComputerPlus.API namespaces that is outside the wrapper class, which would cause the system to try to bind to that assembly when it is not there.

As you might guess, I make PeterUCallouts. I love working to bring LSPDFR players the kind of callouts that strike a good balance between realism and fun and are stable & varied!

Unfortunately I cannot offer support via PM -- please use the forums, so that others may benefit from your solutions!

Link to comment
Share on other sites

4 hours ago, PeterU said:

Are you able to share the code for the Computer+ integration wrapper class you have?

 

Do you have any references to ComputerPlus or ComputerPlus.API anywhere other than in the wrapper class?

 

It sounds like there is a reference to the ComputerPlus or ComputerPlus.API namespaces that is outside the wrapper class, which would cause the system to try to bind to that assembly when it is not there.

 

Okay, first I thought I had checked and double checked everything. But then I remembered I made some little changes to the Wrapper class. (So much for "I followed it to the letter", huh?) ^^

Specifically using the enums provided by Computer+ as argument types when calling the function instead of ints.
I did this because I like enums and because I thought if not using a "using" directive, the compiler would check for the assembly on method call, but it seems I was mistaken.

Thank you for your help!

Edited by Vaskulis
Fixed
Link to comment
Share on other sites

21 hours ago, Vaskulis said:

 

Okay, first I thought I had checked and double checked everything. But then I remembered I made some little changes to the Wrapper class. (So much for "I followed it to the letter", huh?) ^^

Specifically using the enums provided by Computer+ as argument types when calling the function instead of ints.
I did this because I like enums and because I thought if not using a "using" directive, the compiler would check for the assembly on method call, but it seems I was mistaken.

Thank you for your help!

ok you guys geeked out real hardcore what did i miss lol in lame terms lol

Lapd Code 3

Link to comment
Share on other sites

45 minutes ago, LapdCode3 said:

ok you guys geeked out real hardcore what did i miss lol in lame terms lol

 

Well, this is the API Development forum, so my question was about a problem I encountered while writing (programming) a callout plugin.
Since (if I understand you correctly) you don't know a lot about coding (yet) it is a little too specific to explain here, but if you are interested in learning , this youtube playlist by Albo1125 is a good start. It's really not that hard to learn the basics, so go ahead and try it out! :)

If I misunderstood you, or you are still interested in my problem, what basically happened was that my code was trying to use a data type defined in Computer+'s code even when the player doesn't have Computer+ installed. That resulted in a crash because my code couldn't find the data type it was supposed to use.

Link to comment
Share on other sites

6 minutes ago, LapdCode3 said:

i dont suppose i can ask you a Question unless your busy i can leave you a pm

 

Go ahead, just ask here. That way everyone can profit if they have the same question, or write me a pm if you like.

Edited by Vaskulis
Link to comment
Share on other sites

17 minutes ago, Vaskulis said:

 

Go ahead, just ask here. That way everyone can profit if they have the same question!

well Last year when Computer Plus was a popular download i used it with no trouble not even a crash and that was even before els was even in testing.....i run gta v on minimum settings but i have ELS installed and RPH 50 now upon downloading Computer plus ...when lspdfr crashes ....everytime i reload the plugin LSPDFR computer plus stops running like dpad or key stroke to open the computer fails to work ....i have it setup just like readme says but heres what i dont get, last time i was on lspdfr i got little notifications that would 

show that im adding new scripts to the rph but i dont get that now not even for computer+ not even ELS or Lspdfr for 2 weeks this has been an ongoing issue with all my scripts like police radio and computer plus any clue as to why this might be?

 

 

to clarify its harder to patrol when i need a plate check or run an id the quickest way possible

Edited by LapdCode3

Lapd Code 3

Link to comment
Share on other sites

1 hour ago, LapdCode3 said:

well Last year when Computer Plus was a popular download i used it with no trouble not even a crash and that was even before els was even in testing.....i run gta v on minimum settings but i have ELS installed and RPH 50 now upon downloading Computer plus ...when lspdfr crashes ....everytime i reload the plugin LSPDFR computer plus stops running like dpad or key stroke to open the computer fails to work ....i have it setup just like readme says but heres what i dont get, last time i was on lspdfr i got little notifications that would 

show that im adding new scripts to the rph but i dont get that now not even for computer+ not even ELS or Lspdfr for 2 weeks this has been an ongoing issue with all my scripts like police radio and computer plus any clue as to why this might be?

 

 

to clarify its harder to patrol when i need a plate check or run an id the quickest way possible

 

Just because I know a little about coding, doesn't mean I am the best person to help you fix your problem.

My best advice would be to start a new thread in the support section and write a comment in the Computer+ support thread with a link to your thread.

And don't forget to include your log file. That way people who know much more about Computer+ can help you.

Link to comment
Share on other sites

  • 3 weeks later...
On 3/14/2017 at 7:46 AM, LapdCode3 said:

i have no one seems to reply and i had em posted since the 8th and 11th

 

I dont see anything from you regarding issues.. if you posted it in the comments section then it's very easy to miss.

 

PM me with your issue.

Link to comment
Share on other sites

2 minutes ago, ainesophaur said:

 

I dont see anything from you regarding issues.. if you posted it in the comments section then it's very easy to miss.

 

PM me with your issue.

Sorry i forgot to update here but my computer plus is working again thanks to the new update it got i was able to do my traffic stops without fail and my computer plus with its new features is working like a charm thank you for getting back to me but i just fixed it if any issues occur in the future i will contact you personally Thank you Ainesophaur

Lapd Code 3

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...