mobilezonez game error

Started on the old forum in June 2009 · view the original in the archive · old links redirect here

2 replies · 409 views · started 17 years ago · 1 min read

godzilla Developer · 119 posts #1

hello

i m using 8ball game from mobilezomez script.

when i ask any question then,ball do not replying anything.

anybody please help me in this error

else if($action == "8ball")
{
     addonline(getuid_sid($sid), "Talking to magic ball", "");
    
    
     echo "<p align=\"center\"><b><big>The Magic Ball</big></b></p>";
     echo "<p align=\"center\">";
     $gid = $_POST["gid"];
     $un = $_POST["un"];
    
     if($gid == "")
    {
        
        echo "<img src=\"images/8ball.jpg\" alt=\"8Ball\"/><br/>";
        echo "<b><u>Magic Ball</u></b><br/>You can ask a question to magic ball and you'll get a reply, so start asking!<br/>";
        echo "<b><i>Question:</i></b><br/>
        <input type=\"hidden\" name=\"text\" value=\"\"/>";
        echo "<br/>
        <form action=\"games.php?action=8ball&sid=$sid\" method=\"post\">";
        echo "<input name=\"text\" id=\"inputText\"/>";
        echo "<br/>";
        echo "<input id=\"inputButton\" type=\"submit\" value=\"Ask\"/>";
        echo "</form>";
        }
        
         $xfile = @file("text.txt");
        $random_num = rand (0, count($xfile)-1);
        $udata = explode("::", $xfile[$random_num]);
       
        echo "<b><u>The ball says</u></b><br/>";
        echo "<b><i>$udata[1]</i></b><br/>";
        
        echo "<br/><br/><a href=\"games.php?action=main&sid=$sid\">«Back to Games</a><br/>";
        echo "</p>";
    
    }
    
Guest #2

See these lines -

[COLOR=#000000][COLOR=#0000bb]$xfile [/COLOR][COLOR=#007700]= @[/COLOR][COLOR=#0000bb]file[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]"text.txt"[/COLOR][COLOR=#007700]); 
        [/COLOR][COLOR=#0000bb]$random_num [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]rand [/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000bb]count[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$xfile[/COLOR][COLOR=#007700])-[/COLOR][COLOR=#0000bb]1[/COLOR][COLOR=#007700]); 
        [/COLOR][COLOR=#0000bb]$udata [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000bb]explode[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]"::"[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000bb]$xfile[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000bb]$random_num[/COLOR][COLOR=#007700]]);[/COLOR][/COLOR]

Make sure you have that text.txt file uploaded in the same directory with permissions set to 777. Here is a demo text.txt, you can use and add other things in it if you want.

Attachments: text.txt
godzilla Developer · 119 posts #3

thank you so much rey.

i didnt uploaded text.txt

and i did now.

working fine.

mwah..........

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close