Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bugs and added API #572

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

OceanicNomad
Copy link

I fixed the bugs with the combat system, one issue was PHP 8 related and the other an incorrectly defined constant in report generation.

Also implemented an API feature
playerapi
uniapi

@jbezza123
Copy link

so i had to add this to both php files in the api folder

$dsn = "mysql:host=" . DB_HOST . ";dbname=" . DB_NAME; $options = [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_EMULATE_PREPARES => false, ]; $pdo = new PDO($dsn, DB_USER, DB_PASS, $options);

also change the secret word for planets in playerdata.php on line 40 and line 63 to xgp_
in serverdata its line 16 but yh other than that it all works, maybe an easier way to intergrate

@jbezza123
Copy link

place in game directory and this will install the api mod, but i abbreviated the endpoints to /public/api/PD.php and /public/api/SD.php also i changed them to return the json file, as the webpage is nice but impractical since i just want the data
install api.zip

@jonamix-ar
Copy link

You don't need PDO to do it, you can use App\Core\Database and it will take the data

@LucasKovacs
Copy link
Member

What is this fixing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants