Jump to content
MakeWebGames

Way of the Mafia Script


Fraserb

Recommended Posts

I've tried GL and don't really like it, if anyone has a WoTM script i will pay a finders fee

Try [MENTION=65371]sniko[/MENTION]'s Panther. It contains the core of any game and other neat features. If you're looking to get in to coding I'd suggest this. It's a skeleton which can be turned in to a top game (if you invest time in to it). Comes with Bootstrap too.

Edit #1

If you do plan on using the this engine, then use this installer. Someone ruined the one on [MENTION=65371]sniko[/MENTION]'s page.

Edit #2

If you do go live with a game on this engine, then I suggest you un-comment line 238-239 in the installer.

Edited by Script47
Link to comment
Share on other sites

Thanks I'm trying to get it running now, I have followed all the instructions and when I go to it on my browser I just get

Not Found

The requested URL /index was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

any ideas what im doing wrong thanks

Link to comment
Share on other sites

Thanks I'm trying to get it running now, I have followed all the instructions and when I go to it on my browser I just get

Not Found

The requested URL /index was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

any ideas what im doing wrong thanks

Im not familiar with Panther but do you have mod_rewrite enabled?

Link to comment
Share on other sites

I re uploaded the htaccess and now it is working just one problem, i register an account it all works until character select i chose a username and an avatar then it just takes me back to main login. I have checked PHPmyadmin and it is showing the registered user though. Any ideas?

Thanks BTW

Link to comment
Share on other sites

If there is enough interest in Panther, I can publish an updated version and accompany it with a website to help with installation and FAQ's.

[MENTION=71090]Fraserb[/MENTION] - I'm currently at work. If you haven't sorted it before I get home (in 5 hours), please add me on skype. (harry.sniko) - or add me on Skype anyway :p

Thanks!

(Thanks [MENTION=68711]KyleMassacre[/MENTION] and [MENTION=69670]Script47[/MENTION])

Edited by sniko
Link to comment
Share on other sites

Kylemassacre - I'm using the skeleton 0.6

Sniko - That would be great, maybe just speak to MWG about letting you have a whole subforum dedicated to Panther to save you money on hosting. I'll keep trying until 5 then, Thanks.

Link to comment
Share on other sites

I have got past the character creation now as I created user on the database instead of through the signup. It shows me logged in but then when I click 'gym' for example it just takes me back to main log in page again.

That seems like a sessions issue, i'll take a look at the code now and if I notice anything then i'll report back

Not sure if this makes a difference not:

if(! array_key_exists('uid', $_SESSION) AND !in_array($_GET['page'], array('signup', 'index')) ) {

the space between the ! and array_key_exists() ? i'd remove it anyway just incase

The only other thing i can see is that this is returning false:

function character_is_set_up($user_id) {
   global $db;
   /*
    * Check to see if the user has completed
    * character set-up
    */
   $char_name = '';
   $query = $db->query("SELECT `char_name` FROM `users` WHERE `id`=$user_id");
   if ($query->num_rows) {
       $r = $query->fetch_row();
       if ($r['0'] == '') {
           return FALSE;
       } else {
           return TRUE;
       }
   } else {
       return FALSE;
   }
}

 

at this part of the globals:

if (module_installed('character_creator') AND character_is_set_up($_SESSION['uid']) == FALSE) {
           ob_clean();
           header('Location: character_creator');
           exit;
       }
Edited by Coly010
Link to comment
Share on other sites

That seems like a sessions issue, i'll take a look at the code now and if I notice anything then i'll report back

Not sure if this makes a difference not:

if(! array_key_exists('uid', $_SESSION) AND !in_array($_GET['page'], array('signup', 'index')) ) {

the space between the ! and array_key_exists() ? i'd remove it anyway just incase

The only other thing i can see is that this is returning false:

function character_is_set_up($user_id) {
   global $db;
   /*
    * Check to see if the user has completed
    * character set-up
    */
   $char_name = '';
   $query = $db->query("SELECT `char_name` FROM `users` WHERE `id`=$user_id");
   if ($query->num_rows) {
       $r = $query->fetch_row();
       if ($r['0'] == '') {
           return FALSE;
       } else {
           return TRUE;
       }
   } else {
       return FALSE;
   }
}

 

at this part of the globals:

if (module_installed('character_creator') AND character_is_set_up($_SESSION['uid']) == FALSE) {
           ob_clean();
           header('Location: character_creator');
           exit;
       }

> the space between the ! and array_key_exists() ? i'd remove it anyway just incase

No, it doesn't matter. You need that condition to go through a NOT gate (ie: make true become false and vice versa). Though, you can do this instead;

 

if(array_key_exists('uid', $_SESSION) === FALSE AND !in_array($_GET['page'], array('signup', 'index')) ) {

[MENTION=71090]Fraserb[/MENTION] - I'll be able to assist you in ~2 hours from now via Skype

Link to comment
Share on other sites

> the space between the ! and array_key_exists() ? i'd remove it anyway just incase

No, it doesn't matter. You need that condition to go through a NOT gate (ie: make true become false and vice versa).

Ah i wasn't sure if the space affected the NOT gate, that was all i was saying :)

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...