Bloodrose Emporium
Index > Login
Name: Password: Remember:

» Forums » Public Board » Scripts » auto-harvester in mush


Kealiock
Family Friend

Joined: 11.09.2005
Posts: 210
Posted: 12 Mar 2006 07:25     Subject: auto-harvester in mush
ok.. i need help

herbs = world.getvariable "concoctions_herbs"
if herbs > 0 then world.send "harvest @concoctions_herb"


tells me what is wrong here

will post my final copy when its done

Up View profile :: Send message
Indiana
Indiana
Council Member

Joined: 06.12.2004
Posts: 867
Posted: 12 Mar 2006 07:28     Subject:
Well, firs you didn't put an End If at the end (assuming that's VBScript), second, make sure you check the box "Expand Variables" ..  oh yeah, you also didn't use () for parameters of GetVariables.

Something like:
herbs = world.getvariable ("concoctions_herbs"

should do.

Up View profile :: Send message
Kealiock
Family Friend

Joined: 11.09.2005
Posts: 210
Posted: 12 Mar 2006 07:28     Subject:
wow... im dum sometimes

Up View profile :: Send message
Avian

Council Member

Joined: 12.12.2004
Posts: 1124
Posted: 12 Mar 2006 07:31     Subject:
Sometimes?
Up View profile :: Send message
Kealiock
Family Friend

Joined: 11.09.2005
Posts: 210
Posted: 12 Mar 2006 07:35     Subject:
shut up avi

Up View profile :: Send message
Kealiock
Family Friend

Joined: 11.09.2005
Posts: 210
Posted: 12 Mar 2006 07:39     Subject:
herbs = world.getvariable ("concoctions_herbs"
if herbs > 0 then world.send "harvest @concoctions_plant"
end if

that btter? im still getting n error

Up View profile :: Send message
Indiana
Indiana
Council Member

Joined: 06.12.2004
Posts: 867
Posted: 12 Mar 2006 07:50     Subject:
Well, looks better, perhaps if you post the error you get I could help you more.
Up View profile :: Send message
Kealiock
Family Friend

Joined: 11.09.2005
Posts: 210
Posted: 12 Mar 2006 08:02     Subject:

Expected statement
Line in error:
END IF

Up View profile :: Send message
Indiana
Indiana
Council Member

Joined: 06.12.2004
Posts: 867
Posted: 12 Mar 2006 08:06     Subject:
Weird, try to put on different lines the If part, the one after Then and the last one with End If ... other than that don't see any problems, here's an example of a trigger that ... well, works:

If World.GetVariable ("xstd" = 1 Then
World.Send "stand"
End If

Up View profile :: Send message
Kealiock
Family Friend

Joined: 11.09.2005
Posts: 210
Posted: 12 Mar 2006 08:10     Subject:
ill have to post my whole system...
Up View profile :: Send message

Pag: 1 2 3
Advertising
© Copyright 2001-2015 iNDY Design. Contact - About