DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • September 25, 2017, 05:21:41 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Poll
Question: Do you like the changes I've made?
Excellent - 5 stars. - 3 (42.9%)
Good - 4 stars. - 3 (42.9%)
Average - 3 stars. - 1 (14.3%)
Bad - 2 stars. - 0 (0%)
Pointless - 1 star. - 0 (0%)
Total Voters: 7

Pages: 1 [2]   Go Down
  Print  
Author Topic: Wrongful Wraiths v1.2.6 (Modified)  (Read 4367 times)
0 Members and 1 Guest are viewing this topic.
TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 126


View Profile
« Reply #15 on: July 02, 2017, 01:30:51 PM »

new fie throws the following error:

Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/savmor/public_html/modules/wraiths.php on line 145

I can't really see what is wrong, so I went back to the old file for now.

This is line 145 by the way:

Code:
if( isset(httpget('reset')) && httpget('reset') == 'yes' )

No idea what isset refers to here.
Could this be a function that only exists on versions higher than 1.1.0??

If so...is there a way to alter this line to fit?

It helps if I know exactly what one is trying to fetch and from where.

Of course it seems to me like I could just out a nav in there to change prefs and then have the prefs reset to default so that next time they show up they need to choose again...

I am liking this just wish it would work with the new underwear choices on my server too.  right now this just does not work....
« Last Edit: July 06, 2017, 02:21:29 AM by TGTarheel » Logged
Boris735
Mod God
*****
Offline Offline

Posts: 568


View Profile
« Reply #16 on: July 06, 2017, 05:58:45 AM »

This error message usually means that a double quote (or single quote) has been left out on a previous line, leading to an unterminated string.  Syntax highlighting should show you the location of the issue (which will be somewhere before the line number you were given).  If you don't have some way to syntax highlight it, then you'll have to inspect it by hand.  Work backwards from that line, looking for missing quotes.
Logged
TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 126


View Profile
« Reply #17 on: July 06, 2017, 06:58:02 AM »

This error message usually means that a double quote (or single quote) has been left out on a previous line, leading to an unterminated string.  Syntax highlighting should show you the location of the issue (which will be somewhere before the line number you were given).  If you don't have some way to syntax highlight it, then you'll have to inspect it by hand.  Work backwards from that line, looking for missing quotes.

I have Notepad ++

I have found an error, but fixing it had no effect, it still fouls up.  And I can find no cause for it in the entire code...even with what I found fixed it STILL FOULS UP.

What i found was AFTER line 145 anyway....where an open/close ellipse is used where parenths ought to be used.

Replacing them made no difference...it still fouled up.

For info ourposes, the line that was incorrectt like that is line 152.  It uses an ellipse opne/close where it should use a parenth open/cose.  But fixing that error did not fix the problem.

I see nowhere prior to 145 where a quote was missed, or an open/close ellipse or open/close parenth was messed up...they all seem correct.

I see nowhere where a semicolon was missed either.

The ony other strange thng I see...and I dubt this has anything to do with the eror....way back in line 57 in th prefs...there is the last pref being estblished, and a comma is not ending that line...like all the other lines in the prefs array.  BUt above the other array does not have a comma at the end.

It DOES, howeer have one after it's close-parenth...but the close-parenth on line 58...does NOT have a comma.

Dunno if this culd be causing the problems.

Other than the things I just mentioned i am at a total loss here.
Logged
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1740


View Profile
« Reply #18 on: July 06, 2017, 07:56:30 AM »

$info is a multi dimensional array. Basically an array that has arrays inside it. To separate values in an array you use a comma, but the last value in that array doesn't require a comma. An array ends in a bracket, but if that array is also a value with another value after it, then a comma is used to separate the two.

Blast, can't see anything wrong either so I'm gonna have to load up my test server to see what errors php is spitting out. In cases like this is basically just comment out sections of code until the script works and then stare at the code for 20 minutes until something jumps out and slaps me. Cheesy
Logged

TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 126


View Profile
« Reply #19 on: July 06, 2017, 10:15:58 AM »

Thanks for taking a look.

Nothing is jumping at me either.  I had it on a code editor, and I did not find any missing semmicolons, commas, partenths or ellipses.

That's what I always look for...I have a bad habit of missing them, LOL.

Anyway, other than the error I mentioned where an open/close ellipse is used where an open/close parenth should be...on  line 152 - I saw nothing else that jumped out at me.
Logged
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1740


View Profile
« Reply #20 on: July 06, 2017, 02:05:36 PM »

The problem is this line,
Code:
<?php
if( isset(httpget('reset')) && httpget('reset') == 'yes' )

It doesn't like isset() for some reason, works fine without it,

Code:
<?php
if( httpget('reset') && httpget('reset') == 'yes' )

I'm tweaking the module more now, the quick fix reset allows the player to pick which sex again, but not the option to be spanker or spankee due to the way I wrote it. xD
Logged

TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 126


View Profile
« Reply #21 on: July 06, 2017, 02:59:40 PM »

The problem is this line,
Code:
<?php
if( isset(httpget('reset')) && httpget('reset') == 'yes' )

It doesn't like isset() for some reason, works fine without it,

Code:
<?php
if( httpget('reset') && httpget('reset') == 'yes' )

I'm tweaking the module more now, the quick fix reset allows the player to pick which sex again, but not the option to be spanker or spankee due to the way I wrote it. xD

Keep m eposted.  Did ya fix the line 152 with the ellipses where parenths ought to be??
Logged
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1740


View Profile
« Reply #22 on: July 06, 2017, 04:36:40 PM »

Nothing wrong with line 152 here. Can you post the code?
Logged

TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 126


View Profile
« Reply #23 on: July 06, 2017, 05:00:36 PM »

Nothing wrong with line 152 here. Can you post the code?

OK, this is what I have when I download...

Code:
function wraiths_run()
{
global $session;

if( isset(httpget('reset')) && httpget('reset') == 'yes' )
{
set_module_pref('gender', 0);
}

if( get_module_setting('inallloc') == 1 )
{
page_header("Wraith's {$session['user']['location']} House of Spanking");

The last line in my code there...is the line where the error is.  That is line 152.

You used ellipses to enclose $session['user']['location'] instead of parenths.  It is barely visible, but it is there.
Logged
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1740


View Profile
« Reply #24 on: July 06, 2017, 05:47:00 PM »

Yes, that's perfectly fine. The curly brackets as I like to call them hold the session variable name together as it has keys, without them you get an error.

if you want to, you can change it to,
Code:
<?php
$location 
$session['user']['location'];
page_header("Wraith's $location House of Spanking");


Smiley
Logged

TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 126


View Profile
« Reply #25 on: July 06, 2017, 06:32:29 PM »

Yes, that's perfectly fine. The curly brackets as I like to call them hold the session variable name together as it has keys, without them you get an error.

if you want to, you can change it to,
Code:
<?php
$location 
$session['user']['location'];
page_header("Wraith's $location House of Spanking");


Smiley

okay...well I never before saw $session['user']['xvariable'] held together with ellipses instead of parenths, so I thought it was an error.  If it works it works.

Sometimes, I get coding things and something works and I don't understand why, but I say to myself, the hell with it, it works so who cares...LOL
Logged
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1740


View Profile
« Reply #26 on: July 06, 2017, 07:58:22 PM »

http://php.net/manual/en/language.types.string.php

Have a quick gander at this page to show/explain the differences between single and double quotes. Smiley
Logged

TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 126


View Profile
« Reply #27 on: July 06, 2017, 08:47:12 PM »

http://php.net/manual/en/language.types.string.php

Have a quick gander at this page to show/explain the differences between single and double quotes. Smiley

I see, says the blind girl to the deaf dog!!

So it prevents escape on special characters if you wrap with ellipses!!  And wrapping in single ' versus double " also prevents escape on special characters.

Now I never knew that.

That might explain why I had the grand=royal biatch doing some things with my Forest Guild module...which I DID manage to get working...but boy howdy, I have a complex mother of a boolean argument and six prefs set up that tell it where in the module that you are so that the wrong text doesn't show up in the wrong place!!

See what I mean about being a sloppy coder and a demented one at that...that finds demented ways of solving problems when simpler solutions exist...except that I don't know about them...LOL!!
Logged
Boris735
Mod God
*****
Offline Offline

Posts: 568


View Profile
« Reply #28 on: July 08, 2017, 11:12:57 PM »

okay...well I never before saw $session['user']['xvariable'] held together with ellipses instead of parenths, so I thought it was an error.  If it works it works.

By the way, those aren't ellipses.  An ellipsis is three dots in a row ("...").  The curly brackets ("{", "}") are officially called "braces" in American usage, but people tend to more easily understand "curly brackets" or "squiggly brackets".
Logged
TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 126


View Profile
« Reply #29 on: July 09, 2017, 12:55:06 PM »

OK...got me.   I always called them ellipses.  I dunno.  I never knew what the heck you called them, really.  LOL
Logged
Pages: 1 [2]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
34 Guests, 1 User
Talisman
Home Forums News Downloads Login Register Advanced Search