ID:143376
 
Code:
mob/Login()
usr.Start()

mob
proc
Start()
switch(alert("Welcome to Dragonball Z: Final Fury!","Dragonball Z: Final Fury","New Character","Load Character"))
if("New Character")
switch(alert("Which Slot do you wish to Select?","","Slot 1","Slot 2","Slot 3"))
if("Slot 1")
if(fexists("Player Saves/[src.client.ckey]/Save File 1.sav"))
switch(alert("You already have a Character on Slot 1. Overwrite it?","","Yes","No"))
if("Yes")
fdel("Player Saves/[src.client.ckey]/Save File 1.sav")
src.save_file_1 = 1
Create()
else
goto Start
return
else
src.save_file_1 = 1
Create()
if("Slot 2")
if(fexists("Player Saves/[src.client.ckey]/Save File 2.sav"))
switch(alert("You already have a Character on Slot 2. Overwrite it?","","Yes","No"))
if("Yes")
fdel("Player Saves/[src.client.ckey]/Save File 2.sav")
src.save_file_2 = 1
Create()
else
goto Start
return
else
src.save_file_2 = 1
Create()
if("Slot 3")
if(fexists("Player Saves/[src.client.ckey]/Save File 3.sav"))
switch(alert("You already have a Character on Slot 3. Overwrite it?","","Yes","No"))
if("Yes")
fdel("Player Saves/[src.client.ckey]/Save File 3.sav")
src.save_file_3 = 1
Create()
else
goto Start
return
else
src.save_file_3 = 1
Create()

if("Load Character")
switch(alert("Which Slot do you wish to Select?","","Slot 1","Slot 2","Slot 3"))

if("Slot 1")
if(fexists("Player Saves/[src.client.ckey]/Save File 1.sav"))
usr.save_file_1 = 1
usr.client.Load()
else
alert("No Saved File Found!")
sleep(5)
goto Start
return
if("Slot 2")
if(fexists("Player Saves/[src.client.ckey]/Save File 2.sav"))
usr.save_file_2 = 1
usr.client.Load()
else
alert("No Saved File Found!")
sleep(5)
goto Start
return
if("Slot 3")
if(fexists("Player Saves/[src.client.ckey]/Save File 3.sav"))
usr.save_file_3 = 1
usr.client.Load()
else
alert("No Saved File Found!")
sleep(5)
goto Start
return


Problem description:

Sorry for the big code to look over, but I need help. Whenever I compile, I get this error:

Dragonball Rebirth\1.0 System\1.1 Character Creation\Character Creation.dm:38:error:Start :jump failed

I've glanced over the DM Guide and asked all my friends for help, but they don't know what that error means, or how to fix it. I thought it might be indentation or something, but that doesn't seem to be the case, as I think I've tried everything to fix an indentation error.

It's probably something really simple, isn't it? <_<

Also, please don't rip on me for using the Dragonball Rebirth source...I'm only an amateur at coding, and this is more of a learning experience for me than an actual game.
RedMageofRed wrote:
Code:
> mob/Login()
> usr.Start()
>
> mob
> proc
> Start()
> switch(alert("Welcome to Dragonball Z: Final Fury!","Dragonball Z: Final Fury","New Character","Load Character"))
> if("New Character")
> switch(alert("Which Slot do you wish to Select?","","Slot 1","Slot 2","Slot 3"))
> if("Slot 1")
> if(fexists("Player Saves/[src.client.ckey]/Save File 1.sav"))
> switch(alert("You already have a Character on Slot 1. Overwrite it?","","Yes","No"))
> if("Yes")
> fdel("Player Saves/[src.client.ckey]/Save File 1.sav")
> src.save_file_1 = 1
> Create()
> else
> goto Start
> return
> else
> src.save_file_1 = 1
> Create()
> if("Slot 2")
> if(fexists("Player Saves/[src.client.ckey]/Save File 2.sav"))
> switch(alert("You already have a Character on Slot 2. Overwrite it?","","Yes","No"))
> if("Yes")
> fdel("Player Saves/[src.client.ckey]/Save File 2.sav")
> src.save_file_2 = 1
> Create()
> else
> goto Start
> return
> else
> src.save_file_2 = 1
> Create()
> if("Slot 3")
> if(fexists("Player Saves/[src.client.ckey]/Save File 3.sav"))
> switch(alert("You already have a Character on Slot 3. Overwrite it?","","Yes","No"))
> if("Yes")
> fdel("Player Saves/[src.client.ckey]/Save File 3.sav")
> src.save_file_3 = 1
> Create()
> else
> goto Start
> return
> else
> src.save_file_3 = 1
> Create()
>
> if("Load Character")
> switch(alert("Which Slot do you wish to Select?","","Slot 1","Slot 2","Slot 3"))
>
> if("Slot 1")
> if(fexists("Player Saves/[src.client.ckey]/Save File 1.sav"))
> usr.save_file_1 = 1
> usr.client.Load()
> else
> alert("No Saved File Found!")
> sleep(5)
> goto Start
> return
> if("Slot 2")
> if(fexists("Player Saves/[src.client.ckey]/Save File 2.sav"))
> usr.save_file_2 = 1
> usr.client.Load()
> else
> alert("No Saved File Found!")
> sleep(5)
> goto Start
> return
> if("Slot 3")
> if(fexists("Player Saves/[src.client.ckey]/Save File 3.sav"))
> usr.save_file_3 = 1
> usr.client.Load()
> else
> alert("No Saved File Found!")
> sleep(5)
> goto Start
> return
>

Problem description:

Sorry for the big code to look over, but I need help. Whenever I compile, I get this error:

Dragonball Rebirth\1.0 System\1.1 Character Creation\Character Creation.dm:38:error:Start :jump failed

I've glanced over the DM Guide and asked all my friends for help, but they don't know what that error means, or how to fix it. I thought it might be indentation or something, but that doesn't seem to be the case, as I think I've tried everything to fix an indentation error.

It's probably something really simple, isn't it? <_<

Also, please don't rip on me for using the Dragonball Rebirth source...I'm only an amateur at coding, and this is more of a learning experience for me than an actual game.

                        if("Slot 3")
if(fexists("Player Saves/[src.client.ckey]/Save File 3.sav"))
switch(alert("You already have a Character on Slot 3. Overwrite it?","","Yes","No"))
if("Yes")
fdel("Player Saves/[src.client.ckey]/Save File 3.sav")
src.save_file_3 = 1
Create()
else
goto Start
return
else
src.save_file
Somewhere in there let me look (edit in future )
In response to Fusioneko
First off, never EVER use goto. Or else you'll end up like this guy - http://xkcd.com/292/

Also, your error lies in your goto, ironically. Try to restructure it so you don't need goto.
In response to SpikeNeedle
There is no problem with using goto.
You can always make a while statement that can do what goto does, but that's just another alternative, you don't have to do it.

If you want to use goto, use goto.
If you know how to use it, use it.
There is no problem, you're not going to be attacked by a raptor.

Anyway, the only problem here is you are using goto incorrectly.
I'm assuming this problem is coming from the fact that the procedure is called Start, but anyway.
You don't have a label for it to jump to, so make one.

mob
proc
Start()
Start: // the : isn't necessary, but I like to use it as a reminder
// your code...