|
Development Forum |
 |
|
 Tea Queen
Laura
    

|
4/10/2013 | |
Would someone be able to help me work out what the two syntax errors are in my piece of code so far, please? 
I'm working on a new agent, for DS, and the CAOS Tool throws a tantrum every time I try to inject the install script (because I want to test things as I go... at least, that was the plan):
*install:
new: simp 2 23 14851 "wumpadis" 1 0 500
bhvr 1
attr 199
elas 10
aero 5
accg 7
perm 100
fric 50
*inject into inventory:
enum 1 2 23
spas targ va00
doif ov00 = 0 and clac = 0
mesg writ targ 0
endi
next
*activation:
scrp 2 23 14851 1
*'jump':
velo -2 rand -1 1
*random dispensing:
doif rand 1 3 eq 1
*vend fruit:
setv va00 posl
setv va01 posy
new: simp 2 8 14851 "wumpadis" 3 1 501
bhvr 48
attr 195
elas 10
aero 5
accg 7
perm 100
fric 50
*remove:
rscr
enum 2 23 14851
kill targ
next
scrx 2 23 14851 12
endi |
For some reason 'rscr' always shows up in red? I bet the answer is really obvious to all you experienced lot out there; I apologise for being such a novice, but this agent will be awesome! I promise.
Thank you for any help in advance! |
 Peppery One
Papriko
    
|
4/10/2013 | |
You started the activation script scrp 2 23 14851 1 but between the lines fric 50 and *remove: you forgot to finish the script with an endm line.
Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis... |
 Prodigal Sock
Ghosthande
    

|
4/10/2013 | |
Yes, you need an "ENDI" after the fruit injection bit, to end your "DOIF", and an "ENDM" to close the script itself. 
 |
 Tea Queen
Laura
    

|
4/10/2013 | |
Thank you, guys; finally got to the bottom of it and posted a teaser screenshot here!  |

Malkin
     Manager

|
4/10/2013 | 1 |
Don't forget to add an 'I have played with a machine' stimulus (stimulus #90) to the activate script - that will make norns enjoy pushing it more. ![[ngrin] [ngrin]](/images/smilies/emot_grin.gif)
Just slip
in the activation script, before the 'jump'.
My TCR Norns |
 Prodigal Sock
Ghosthande
    

|
4/10/2013 | |
That's true, actually... I've heard that non-CFE Norns also tend to push something a million times if they don't get a stimulus from it, so adding one may help them not act so dumb.
 |

Malkin
     Manager

|
4/10/2013 | |
Or worse, they stop experimenting with other dispensers if they learn early in life that pushing dispensers doesn't feel like anything.
My TCR Norns |
 Tea Queen
Laura
    

|
4/11/2013 | 1 |
Thanks for the tip, Malkin. |

Malkin
     Manager

|
4/11/2013 | 1 |
You're welcome! I suggested that it should be before the jump to 'get it out of the way' and so that it always stimulates the creatures, no matter if the vendor vends or not. ![[ngrin] [ngrin]](/images/smilies/emot_grin.gif)
My TCR Norns |
 Tea Queen
Laura
    

|
4/11/2013 | |
Definitely sounds useful! |