# Syntax Error

Page 1 of 1

## 5 Replies - 4578 Views - Last Post: 20 November 2008 - 06:52 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=72649&amp;s=dc953756ca45d4dceef84e0466a76b3b&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

Reputation: 0
• Posts: 19
• Joined: 11-November 08

# Syntax Error

Posted 19 November 2008 - 03:50 PM

Okay...I put this in:

```print "Is 3 = 4 or 8 > 2?"
print (3 = 4 || 8 > 2)
```

When it gets to "print (3 = 4 || 8 > 2)", it says syntax error. How do I fix this?
Is This A Good Question/Topic? 0

## Replies To: Syntax Error

### #2 Martyr2

• Programming Theoretician

Reputation: 5186
• Posts: 13,914
• Joined: 18-April 07

## Re: Syntax Error

Posted 19 November 2008 - 04:00 PM

Make it "3 == 4" and not "3 = 4". You are testing equality here, so you need the double equal signs. This is saying "is 3 equal to 4?" Obviously it is not, but since 8 is greater than 2, the whole thing is true. So the result is Is 3 = 4 or 8 > 2?true

This post has been edited by Martyr2: 19 November 2008 - 04:01 PM

Reputation: 0
• Posts: 19
• Joined: 11-November 08

## Re: Syntax Error

Posted 19 November 2008 - 04:02 PM

Oh...whoops!
Wait...even after I fixed that, it still gives me syntax error. As weird as this sounds, I'm using RPG Maker XP to test my Ruby... I don't know if it's RPGMXP or my language.

This post has been edited by ShadowKyogre: 19 November 2008 - 04:04 PM

### #4 Martyr2

• Programming Theoretician

Reputation: 5186
• Posts: 13,914
• Joined: 18-April 07

## Re: Syntax Error

Posted 19 November 2008 - 04:10 PM

Well it is the maker you are using because I know the fix to be correct and outputs exactly what I am showing you. Make sure that you have dumped any cached files it might be using and saving your change correctly. Sounds like you need a refresh somewhere.

Reputation: 0
• Posts: 19
• Joined: 11-November 08

## Re: Syntax Error

Posted 19 November 2008 - 04:19 PM

Thinking...
Saving change correctly: Yes
Dump cached files: No....but how would I do that? I don't think I have any cached files since I haven't been saving my game each time I test a script.

Reputation: 0
• Posts: 19
• Joined: 11-November 08

## Re: Syntax Error

Posted 20 November 2008 - 06:52 PM

Okay, I fixed it. Apparently, I had to change ! to != when comparing two values...the tut I was looking at did not make that clear.