Jump to content
MakeWebGames

Need Help with an Error


SLASH

Recommended Posts

Im trying to figure out why i'm getting an error in this section of the code from the item market mod Nicholas made several years ago. The error i'm getting is...

Parse error: syntax error, unexpected '=' in.... /itemmarket.php on line 364

and lines 361 through 365 are...

     if($r['imADDER'] == $userid) {
           $link = "[[url='?action=remove&ID=".abs(intval($r[']Remove[/url]]";
       } else {
           $link = "[[url='?action=buy&ID=".abs(intval($r[']Buy[/url]]";
       }

Im pretty new to learning php but based on what i have looked up i can't figure out what is wrong with the ='s in line 364... and line 362 doesn't seem to be producing an error and is formatted the same way. Any help would be greatly appreciated. Thanks.

*** EDIT... Got it figured out. Thanks.***

Edited by SLASH
Got It figured out. Link location was incorrect due to changes in my files.
Link to comment
Share on other sites

On 6/30/2019 at 8:47 AM, SLASH said:

*** EDIT... Got it figured out. Thanks.***

Would be great to post your solution to help others! It looks like an issue with $r within the intval() function.

I'd recommend using an editor with syntax highlighting, it helps in visualizing these sorts of issues. Visual Studio Code is free and pretty great: https://code.visualstudio.com/

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