• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Site Help me here plix

Daniel Braga

New Member
Joined
Mar 17, 2018
Messages
53
Reaction score
1
Fatal error: Uncaught ArgumentCountError: Too few arguments to function Website::getVocationName(), 1 passed in C:\xampp\htdocs\pages\characters.php on line 45 and exactly 2 expected in C:\xampp\htdocs\classes\website.php:168 Stack trace: #0 C:\xampp\htdocs\pages\characters.php(45): Website::getVocationName('352') #1 C:\xampp\htdocs\system\load.page.php(7): include('C:\\xampp\\htdocs...') #2 C:\xampp\htdocs\index.php(37): include_once('C:\\xampp\\htdocs...') #3 {main} thrown in C:\xampp\htdocs\classes\website.php on line 168
 

Attachments

@Daniel Braga

character.php
PHP:
@   $main_content .= '<tr bgcolor="' . $bgcolor . '"><td>Personagem:</td><td>' . htmlspecialchars(Website::getVocationName($player->getVocation())) . '</td></tr>';


if you look at this part = ' . htmlspecialchars(Website::getVocationName($player->getVocation())) . ' only player vocation has been given as parameter, but the actual method (getVocationName) requires 2 parameters

website.php
PHP:
public static function getVocationName($id, $promotion)
 
@Daniel Braga

character.php
PHP:
@   $main_content .= '<tr bgcolor="' . $bgcolor . '"><td>Personagem:</td><td>' . htmlspecialchars(Website::getVocationName($player->getVocation())) . '</td></tr>';


if you look at this part = ' . htmlspecialchars(Website::getVocationName($player->getVocation())) . ' only player vocation has been given as parameter, but the actual method (getVocationName) requires 2 parameters

website.php
PHP:
public static function getVocationName($id, $promotion)




still giving error
 
@Snavy

now it's this way


Fatal error
: Uncaught Error: Call to undefined method Player::getVocationName() in C:\xampp\htdocs\pages\characters.php:45 Stack trace: #0 C:\xampp\htdocs\system\load.page.php(7): include() #1 C:\xampp\htdocs\index.php(37): include_once('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\pages\characters.php on line 45

@Snavy
 
Last edited:
@Snavy


old
@ $main_content .= '<tr bgcolor="' . $bgcolor . '"><td>Personagem:</td><td>' . htmlspecialchars(Website::getVocationName($player->getVocation())) . '</td></tr>';


new code
@ $main_content .= '<tr bgcolor="' . $bgcolor . '"><td>Personagem:</td><td>' . htmlspecialchars(Website::getVocationName($player->getVocationName())) . '</td></tr>';


getVocation >>> getVocationName

@Snavy
 
Last edited:
Back
Top