AinzOoalGown Posted December 23, 2020 Share Posted December 23, 2020 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 Quote Link to comment Share on other sites More sharing options...
URBANZ Posted December 23, 2020 Share Posted December 23, 2020 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. 2 Quote Link to comment Share on other sites More sharing options...
AinzOoalGown Posted December 23, 2020 Author Share Posted December 23, 2020 Thanks for the reply. I will wait for a fix then. Wanted to make sure it works on my server before I purchase the premium version. Quote Link to comment Share on other sites More sharing options...
URBANZ Posted December 23, 2020 Share Posted December 23, 2020 if you have discord add me and will send you a fixed version. URB4NZ#6770 3 Quote Link to comment Share on other sites More sharing options...
AinzOoalGown Posted December 23, 2020 Author Share Posted December 23, 2020 Issue resolved. UrbanMafia fixed the issue for me 🙂 Quote Link to comment Share on other sites More sharing options...
Sim Posted December 23, 2020 Share Posted December 23, 2020 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? Quote Link to comment Share on other sites More sharing options...
URBANZ Posted December 23, 2020 Share Posted December 23, 2020 7 minutes ago, Sim said: All the classes are preloaded now? 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 Quote Link to comment Share on other sites More sharing options...
Sim Posted December 23, 2020 Share Posted December 23, 2020 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? Quote Link to comment Share on other sites More sharing options...
URBANZ Posted December 23, 2020 Share Posted December 23, 2020 in hooks for example you can make custom functions that are accessible though-out the whole engine. you can call these as normal classes and functions and just extend the module then you can call these functions in any of the modules. Quote Link to comment Share on other sites More sharing options...
Dayo Posted December 23, 2020 Share Posted December 23, 2020 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 Quote Link to comment Share on other sites More sharing options...
Sim Posted December 24, 2020 Share Posted December 24, 2020 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(); Quote Link to comment Share on other sites More sharing options...
Dayo Posted December 24, 2020 Share Posted December 24, 2020 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. Quote Link to comment Share on other sites More sharing options...
Sim Posted December 24, 2020 Share Posted December 24, 2020 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. Quote Link to comment Share on other sites More sharing options...
Dayo Posted December 24, 2020 Share Posted December 24, 2020 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 Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted December 24, 2020 Share Posted December 24, 2020 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) Quote Link to comment Share on other sites More sharing options...
Sim Posted December 24, 2020 Share Posted December 24, 2020 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. Quote Link to comment Share on other sites More sharing options...
Dayo Posted December 24, 2020 Share Posted December 24, 2020 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 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.