Page 1 of 1

Weird Syntax Error

Posted: 28 Jul 2011 19:00
by Ranguna173
I've created an account on this website because i was having a problem with the game I'm writing...
A friend of mine told me of this website, he said if i had any question a could post it here.. I dunno his username but if you want i can ask him...
Anyways...
Here is my question:
I've been make this game in batch and i came across some weird errors, i figured out some of them except one..
Here is a Paint made image:
Image

The variable "CRED" equals 1000
The variables "ROXDIS1" "ROXDIS2" "ROXDIS3" "ROXDIS4" "ROXDIS5" "ROXDIS6" all equal 0

So i think that is all...
If you need more information or a bigger image just ask!

Re: Weird Syntax Error

Posted: 28 Jul 2011 21:57
by dbenham
If you run with ECHO ON you should be able to determine the line with the syntax error yourself.

In this case, the line

Code: Select all

if %CRED% LSS 200
is to blame. You have your test condition, but you don't specify a command to execute if it evaluates to TRUE.

When posting on this site you should paste code as text, not images. You can use the Code button at the top of the submission editor to paste in the tags needed to specify a code block.

Dave Benham

Re: Weird Syntax Error

Posted: 01 Aug 2011 17:38
by Ranguna173
dbenham wrote:If you run with ECHO ON you should be able to determine the line with the syntax error yourself.

In this case, the line

Code: Select all

if %CRED% LSS 200
is to blame. You have your test condition, but you don't specify a command to execute if it evaluates to TRUE.

When posting on this site you should paste code as text, not images. You can use the Code button at the top of the submission editor to paste in the tags needed to specify a code block.

Dave Benham


Oh!
How couldn't i notice that?!

Ok, I'll post the code next time!
I'm gonna test it, and...
Done, it worked!!

Thx for the "run echo on ON" tip, it's realy helped!

(If you want to try the game just PM me :wink: , I'm stealing some ideas from "Uplink" a "Trace Hacker" games hehehe... :lol: )

Thx for the reply!!
And again..

Thx for the reply :D