ID:273108
 
I am making my own game but i allways have 2 errors it say this:missing left-hand argument to

I need someone to tell me what that meeans and how to fix it.


Thx for help
Since you are having trouble with a specific code snippet, it might be a smart idea to actually provide this code and the exact compiler error.

How to fail at game programming
This is how it looks like so maybe it will be easyer to help me:

obj/proc
Scroll
icon="scroll"
icon_state="1"
verb/Use()
usr.HP+=1000
usr<<"You reed a scroll"
if (usr.HP>usr.MaxHP)>>usr.HP+=usr.MaxHP)

del src
In response to Jedien Yuki
With the way you code you could have any number of bugs but for that script in particular here is a corrected version.

mob/Scroll
icon='scroll.dmi'
icon_state="1"
verb/Use()
set src in view(1)
if (usr.HP>=usr.MaxHP)
usr<<"Your health is already full"
return
usr<<"You read a scroll"
if ((usr.HP+1000)>usr.MaxHP)
usr.HP=usr.MaxHP
else
usr.HP+=1000
del(src)
In response to Chowder
Chowder wrote:
With the way you code you could have any number of bugs but for that script in particular here is a corrected version.

> mob/Scroll
> icon='scroll.dmi'
> icon_state="1"
> verb/Use()
> set src in view(1)
> if (usr.HP>=usr.MaxHP)
> usr<<"Your health is already full"
> return
> usr<<"You read a scroll"
> if ((usr.HP+1000)>usr.MaxHP)
> usr.HP=usr.MaxHP
> else
> usr.HP+=1000
> del(src)
>

Thx my former erros did disapeard but the new two schowd up
Items.dm:5:error: [: expected }
Items.dm:5:error: location of top-most unmatched {
In response to Jedien Yuki
Can you post the first 10 lines of Items.dm?
In response to Chowder
obj/Scroll
icon='scroll.dmi'
icon_state="1"
verb/Use()
[set src in view(1)]
if (usr.HP>=usr.MaxHP)
usr<<"Your health is already full"
return
usr<<"You read a scroll"
if ((usr.HP+1000)>usr.MaxHP)
usr.HP=usr.MaxHP
else
usr.HP+=1000
del src

In response to Jedien Yuki
Your modifications to my script are what caused those errors.
In response to Jedien Yuki
Jedien Yuki wrote:
obj/Scroll
icon='scroll.dmi'
icon_state="1"
verb/Use()
[set src in view(1)]
if (usr.HP>=usr.MaxHP)
usr<<"Your health is already full"
return
usr<<"You read a scroll"
if ((usr.HP+1000)>usr.MaxHP)
usr.HP=usr.MaxHP
else
usr.HP+=1000
del(src

Please post all your code inside <dm>CODE HERE</dm> tags, this will display code on the forum exactly as it appears in Dream Maker.

For your problem, you have [set src in view(1)]. You can't use the characters [ and ] there, as it isn't part of the DM syntax. Remove the [ and ].
In response to Chowder
code\Main.dm:9: Inconsistent indentation.
code\Main.dm:10: Inconsistent indentation.
code\Main.dm:11: Inconsistent indentation.
code\Main.dm:12: Inconsistent indentation.
code\Main.dm:14: Inconsistent indentation.
code\Main.dm:15: Inconsistent indentation.
code\Main.dm:16: Inconsistent indentation.
code\Main.dm:17: Inconsistent indentation.
code\Main.dm:20:error: status: expected end of statement
code\Main.dm:28:error: .: missing comma ',' or right-paren ')'
code\Main.dm:28:error: .: expected end of statement
code\Main.dm:28:error: ): expected }
code\Main.dm:28:error: location of top-most unmatched {

this errors come wtih youre script
In response to Jedien Yuki
You either need to change the tabs out with spaces or the spaces out with tabs.
In response to Chowder
#define DEBUg
world
name=""
status=""
hub=""

New()
if(exists("Config.sav"))
var/savefile/F = new("Config.sav")
F["status"]>>world.status
spawn
RespavnWorld()

var/listTempSkillList=typesof(/obj/skills/)
for(var/O in.TempSkillList)
var/TempSkill=new O()
SkillList+=TempSkil
Del()
var/savefile/F = new("Config sav")
F["status"]<<World status
return ..()
client
view=5
perspective=EDGE_PERSPECTIVE

mob
Login()
src.loc=locate(6.6.2)
vinset(src,"MainWindow,Mainmap" . "icon-size=32")
vinset(src,"MainWindow","Size=800x600;is=maximizer=true;pos=
world<<"<B>[src] has logged in!"
if(src.key==world.host)
src<<"Host GM Granted"
src.verbs+=typesof(/mob/GM/verb)

mob/Logout()
world<<"<B>[src] hass logged out!"
del src

This error showd up after i fixd other errors

code\Main.dm:14:error: proc definition not allowed inside another proc
In response to Jedien Yuki
Might not work the way you planned it to.
I had to delete a few parts to make it work.
#define DEBUG
world
name=""
status=""
hub=""

New()
if(fexists("Config.sav"))
var/savefile/F = new("Config.sav")
F["status"]>>world.status
..()
Del()
var/savefile/F = new("Config sav")
F["status"]<<world.status
..()
client
view=5
perspective=EDGE_PERSPECTIVE

mob
Login()
src.loc=locate(6,6,2)
winset(src,"MainMap","icon-size=32")
winset(src,"MainWindow","size=800x600;is-maximized=true")
world<<"<B>[src] has logged in!"
if(src.key==world.host)
src<<"Host GM Granted"
src.verbs+=typesof(/mob/GM/verb)

mob/Logout()
world<<"<B>[src] has logged out!"
..()
del(src)
In response to Chowder
Chowder wrote:
Might not work the way you planned it to.
I had to delete a few parts to make it work.
> #define DEBUG
> world
> name=""
> status=""
> hub=""
>
> New()
> if(fexists("Config.sav"))
> var/savefile/F = new("Config.sav")
> F["status"]>>world.status
> ..()
> Del()
> var/savefile/F = new("Config sav")
> F["status"]<<world.status
> ..()
> client
> view=5
> perspective=EDGE_PERSPECTIVE
>
> mob
> Login()
> src.loc=locate(6,6,2)
> winset(src,"MainMap","icon-size=32")
> winset(src,"MainWindow","size=800x600;is-maximized=true")
> world<<"<B>[src] has logged in!"
> if(src.key==world.host)
> src<<"Host GM Granted"
> src.verbs+=typesof(/mob/GM/verb)
>
> mob/Logout()
> world<<"<B>[src] has logged out!"
> ..()
> del(src)
>


I dont belive it every time you fix one of my errors at least 7 new shows up
In response to Jedien Yuki
Here is my new problem
mob/SOGuard
Class="Enemey"
var/mob/Target
SO shinobi

icon="SOGuard.dmi"
Gold=1300
Exp= 500
Level=1
MaxHp300
MaxChakra=600
New()
src.HP=src.MaxHp
src.Chakra=src.MaxChakra
spawn()
src.Wander()
return ..()
proc/Wander()
while(src)
if(src.Target)
if.(get_dist(src,src.Target)<1 && !step_to(src,src.Target)
src.Target=null;continue
src.dir=get_dir(src,src.Target)
src.Fight()
if(!ListCheck(srcTarget,oview(5)))

src.Target=null
sleep(rand/10.25))
else
step_rand(src)
sleep(rand(15.25))

if(!src.Target)
for(var/mob/M in oview(5)))
if(M.key)
if(step_to(src.M.1))

src.Target=M
sleep(5)
break
proc/Fight()
for(var/mob/M in get_step(src,src.dir))
if(M.Key)
flick("Attack[src.icon_state]",src)
var/damage=src.Tai-M.Gen
damage=max(0.damage+rand(-1,1))
M.Hp -= damage
M.DamageShow(damage,200,0,0)
M.DethCheck(src)

Supplemental
MonsterBlock
density=1
Enter (mob/M)
if(ismob(M))
if(!istype(M,/mob/Monster))
return 1


And errors are:
code\Monsters.dm:12:error: New: expected end of statement
code\Monsters.dm:21:error: missing condition
code\Monsters.dm:22:error: src: missing comma ',' or right-paren ')'
code\Monsters.dm:22:error: src: expected end of statement
code\Monsters.dm:28:error: ): expected }
code\Monsters.dm:20:error: location of top-most unmatched {
In response to Jedien Yuki
I am sorry to say so, but you might want to consider learning what some of the programming syntax means before you are using it.
Everything you have posted here so far can be fixed within seconds of taking your time and reading up on how you are supposed to interact with Dream Maker.
In response to Schnitzelnagler
Schnitzelnagler wrote:
I am sorry to say so, but you might want to consider learning what some of the programming syntax means before you are using it.
Everything you have posted here so far can be fixed within seconds of taking your time and reading up on how you are supposed to interact with Dream Maker.

maybe soo but in that what you told me to see i dont know whta i am supouse to search.And i will lerne a lot bettter if someone shows me on this forum then on this site you told me to see.
In response to Jedien Yuki
The guide you do not search but read and work with from the beginning through to the end.
The reference should be rather simple, once you have learned enough from the guide.

You say that you learn a lot better by people tossing you code snippets, but, asides from this being generally unrealistic and not logic at all, you have proven thrice now that this is simply not the case.
In response to Jedien Yuki
proc definition not allowed inside another proc
#define DEBUG 
world
name=""
status=""
hub=""

New()
if(exists("Config.sav"))
var/savefile/F = new("Config.sav")
F["status"]>>world.status
spawn
RespavnWorld()

var/listTempSkillList=typesof(/obj/skills/) // <--------- here is error
for(var/O in.TempSkillList)
var/TempSkill=new O()
SkillList+=TempSkil
Del()
var/savefile/F = new("Config sav")
F["status"]<<World status
return ..()
client
view=5
perspective=EDGE_PERSPECTIVE

mob
Login()
src.loc=locate(6.6.2)
vinset(src,"MainWindow,Mainmap" . "icon-size=32")
vinset(src,"MainWindow","Size=800x600;is=maximizer=true;pos=
world<<"<B>[src] has logged in!"
if(src.key==world.host)
src<<"Host GM Granted"
src.verbs+=typesof(/mob/GM/verb)

mob/Logout()
world<<"<B>[src] hass logged out!"
del src


in this i have error calld proc definition not allowed inside another proc and i dont know how to fix it so if someone knows plz help.

In response to Jedien Yuki
Page: 1 2