ID:142233
 
Code:
turf/next
density = 1
layer = 999
Click()
if(usr.baseselected=0
alert("you have not chosen a gender")
return
if(usr.baseselected=1
src.loc = locate(7,7,1)


Problem description: i am just creating a button to click next in charicter creation and i have made this code for it i cant see any problem with the code but i keep getting this error

log in.dm:74:error: alert: missing comma ',' or right-paren ')'

if anyone could help me with this it would be much apreciated

turf/next
density = 1
layer = 999
Click()
if(usr.baseselected=0)
alert("you have not chosen a gender")
return
if(usr.baseselected=1)
src.loc = locate(7,7,1)



.>

By the way i reccomend using if(!usr.baseselected) and if(usr.baseselected).
-SubZeroChaos

In response to SubZeroChaos
Just as a note,

if(usr.baseselected=0)


Wouldn't work anyhow, unless I'm mixing up DM with C. But, usually in if statements, the comparison operator needs to be
==
not
=


Generally this is because it'll actually assign baseselected to 0, rather than compare the value of it to 0.

Someone correct me if I'm wrong.
In response to K'ros Trikare

Yep, i didn't even try to look for another Error =( Good Eyes man but anyway even then he should use the Bullet Proof Code i recoomended dont you think?

Also i reccomend him read the Dm guide since he missed such a simple error which the error itself explains..

-SubZeroChaos
In response to SubZeroChaos
SubZeroChaos wrote:

Yep, i didn't even try to look for another Error =( Good Eyes man but anyway even then he should use the Bullet Proof Code i recoomended dont you think?

Also i reccomend him read the Dm guide since he missed such a simple error which the error itself explains..

-SubZeroChaos

Well, yes, you weren't wrong. Just pointing out an additional error.

I'd highly recommend the DM guide also. Original problem was a very simple syntax error.
In response to K'ros Trikare

Well now thats done :D Back to w/e..

-SubZeroChaos
In response to K'ros Trikare
K'ros Trikare wrote:
Someone correct me if I'm wrong.

Only slightly, we aren't allowed to do assignments in conditions, that's where you're thinking of C.