Jump to content
MakeWebGames

Gangster-Legends-V2 - Install Error


AinzOoalGown

Recommended Posts

Hi,

I've just done a fresh install of Gangster-Legends-V2 and I am getting the following error:

There was an error!

File: /home/northeas/public_html/galacticbounty/init.php
Line: 23
Error: Uncaught Error: Class 'Page' not found in /home/northeas/public_html/galacticbounty/init.php:23 Stack trace: #0 /home/northeas/public_html/galacticbounty/index.php(5): require() #1 {main} thrown
Type: E_RECOVERABLE_ERROR

Any Ideas? This was an install following instructions in which everything seems to have set up correctly, database was built, but after install I get above error.

Wanted to try the free version before I bought the premium.

Thanks

Link to comment
Share on other sites

2 hours ago, urbanmafia said:

this is down to autoloading classes in the newest update as it runs strict type and is case sensitive.

Im sure dayo is working to fix this currently.

Premium version does get full support so would get this fixed quickly with this version.

All the classes are preloaded now?

Link to comment
Share on other sites

58 minutes ago, urbanmafia said:

yes was a suggestion i made a while back and was added to the newest version but still having some issues within the master branch on new installs 

I made the same suggestion but to long ago. So how do you access the other module classes from another module class?

Link to comment
Share on other sites

i suggest you download from a tag not the live copy as that is always under developemt and may have bugs check the tags out @ https://github.com/ChristopherDay/Gangster-Legends-V2/releases/tag/2.2.3

3 hours ago, Sim said:

I made the same suggestion but to long ago. So how do you access the other module classes from another module class?

This is not what i was doing with the update above. I was pre-loading the core class files automatically. I have to think about what you want as it isn't very modular

Link to comment
Share on other sites

4 hours ago, Dayo said:

i suggest you download from a tag not the live copy as that is always under developemt and may have bugs check the tags out @ https://github.com/ChristopherDay/Gangster-Legends-V2/releases/tag/2.2.3

This is not what i was doing with the update above. I was pre-loading the core class files automatically. I have to think about what you want as it isn't very modular

I posted an example of working code a few times. In modules.php class.

Something like: public $mods = array();

Loop threw  ALL mods, pre-load and assign like:

Load crimes

$mods["crimes"] = new crimes();

Then can access the crimes public information if needed.

Same with any other module in any module

$this->mods["modName"]->functionName();

 

 

 

Link to comment
Share on other sites

5 hours ago, Sim said:

I posted an example of working code a few times. In modules.php class.

Something like: public $mods = array();

Loop threw  ALL mods, pre-load and assign like:

Load crimes

$mods["crimes"] = new crimes();

Then can access the crimes public information if needed.

Same with any other module in any module

$this->mods["modName"]->functionName();

 

 

 

Yes I know it would be easy but then you would have to add dependency manager on top of it I.e. module a requires you have module b what requires module c and so on. Without a built in module market it’s not feasible to do it. It would be too much work for the user to install a mod.

Link to comment
Share on other sites

1 minute ago, Dayo said:

Yes I know it would be easy but then you would have to add dependency manager on top of it I.e. module a requires you have module b what requires module c and so on. Without a built in module market it’s not feasible to do it. It would be too much work for the user to install a mod.

The main purpose behind it is to already use the built in features of GL. There are no global functions to get list of crimes, cars, locations,  thefts ect. This makes us modders having to rewrite code(or copy & paste) that us already found in other areas of GL.

Or as you mentioned before, add them to hook files. 

Link to comment
Share on other sites

2 minutes ago, Sim said:

The main purpose behind it is to already use the built in features of GL. There are no global functions to get list of crimes, cars, locations,  thefts ect. This makes us modders having to rewrite code(or copy & paste) that us already found in other areas of GL.

Or as you mentioned before, add them to hook files. 

So what if they install a 3rd party crime module that does things differently, it will now break your mod without warning 

Link to comment
Share on other sites

4 hours ago, Dayo said:

So what if they install a 3rd party crime module that does things differently, it will now break your mod without warning 

What if you were to release a modding guide? Ya know, a list of Dos and Don'ts when it comes to modding GLv2.
3rd-party modders would then be enabled to do as they want while keeping in line with the engine's systems, ultimately not breaking the mod (hopefully)

Link to comment
Share on other sites

I can think of several mods and authors thst have had to wtite/copy getLocations() or getCrimes(), 

Thats the point of being able to access mods functions or include one such as those that people may use in the hooks file so other authors could use.

 

Link to comment
Share on other sites

4 hours ago, Sim said:

I can think of several mods and authors thst have had to wtite/copy getLocations() or getCrimes(), 

Thats the point of being able to access mods functions or include one such as those that people may use in the hooks file so other authors could use.

 

What I’m trying to say is the data returned by such functions can vary majorly depending on the modules installed. You can’t guarantee that the output of such functions will always be the same or even exist. 
 

I honestly can’t see the need for this suggestion, yea it may make your like a little bit easier but it also introduces easy shortcuts for developers that can then lead to major problems going forward.

6 hours ago, Magictallguy said:

What if you were to release a modding guide? Ya know, a list of Dos and Don'ts when it comes to modding GLv2.
3rd-party modders would then be enabled to do as they want while keeping in line with the engine's systems, ultimately not breaking the mod (hopefully)

I think this is a great idea in the new year I’ll write something up

  • Like 2
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...