I am trying to make an otl that has a feature to add operators within it. My problem is that I can't automate the unsyncing of the operator…it works when I do it in the textport.
this is within a callback of a button:
//adds the current selected operator and names it the same as its label
opadd $addplease $addplease;
//attempt to allow editing of contents
otunsync $addplease;
i also tryed:
otunsync -u $addplease;
otunsync -u *;
otunsync *;
I also tryed putting the path before the name…assuming it isnt finding the operator….but it all worked in the textport…I am confused.
nothing worked for me…please help!
otunsync problems
3556 8 0- lynch_ppl
- Member
- 176 posts
- Joined: July 2005
- Offline
- edward
- Member
- 7694 posts
- Joined: July 2005
- Online
- lynch_ppl
- Member
- 176 posts
- Joined: July 2005
- Offline
- JColdrick
- Member
- 4140 posts
- Joined: July 2005
- Offline
- lynch_ppl
- Member
- 176 posts
- Joined: July 2005
- Offline
yeah I am definetly using the semi-colon to indicate a new line…
I guess I just wasnt aware that I could leave the last line without…
thanks…..
the semi-colon unfortunetly wasn't affecting the otunsync problem when I took it out…I'm still going to add that to my future practice…
any other ideas to get otunsyc working?
I guess I just wasnt aware that I could leave the last line without…
thanks…..
the semi-colon unfortunetly wasn't affecting the otunsync problem when I took it out…I'm still going to add that to my future practice…
any other ideas to get otunsyc working?
Edited by - Dec. 27, 2005 13:45:37
- wolfwood
- Member
- 4256 posts
- Joined: July 2005
- Offline
JColdrick
The semi-colon is supposed to indicate newline on a single line, as in:
cd /obj ; opls
The key word here is “supposed”
:?
Every month or so I get smacked by this because I forget that the following doesn't work.
for i=0 to 10 ; echo $i ; end ;
One of these days I'll remember….
Edited by - Dec. 27, 2005 13:55:48
if(coffees<2,round(float),float)
- wolfwood
- Member
- 4256 posts
- Joined: July 2005
- Offline
lynch_ppl
I am trying to make an otl that has a feature to add operators within it. My problem is that I can't automate the unsyncing of the operator…it works when I do it in the textport.
Careful what your current network is. (oppwd)
If you callback script is on /obj/model then the script is basically doing this before its run opcf /obj/model
So if you are trying to unsync something in /obj then you'll need to do a
opcf ..
first or just
otunsync ../*
Best way to find out where the hell you are at, is to do
message `oppwd()`
When ever I'm doing callbacks I have these things everywhere to make sure the script is executing in the correct place.
So if you have a button on a digital asset that adds nodes to the asset then you'd need something like this
otunsync .
opadd geo myTurnip
if(coffees<2,round(float),float)
- lynch_ppl
- Member
- 176 posts
- Joined: July 2005
- Offline
thank you so much…
I never thought about error checking like that…
I finally got it to work after a couple more tries…
I feel so much better now!
final code if anyone is interested:
set addplease = `chs(oppwf() + “/add_op”)`; opcd `oppwf()`/object_container/; opadd $addplease $addplease; opcf `oppwd()`; message `oppwd()`; otunsync `oppwd()`/$addplease*
I never thought about error checking like that…
I finally got it to work after a couple more tries…
I feel so much better now!
final code if anyone is interested:
set addplease = `chs(oppwf() + “/add_op”)`; opcd `oppwf()`/object_container/; opadd $addplease $addplease; opcf `oppwd()`; message `oppwd()`; otunsync `oppwd()`/$addplease*
- wolfwood
- Member
- 4256 posts
- Joined: July 2005
- Offline
One of the things that will save you headaches down the road is to Embed your script into your digital asset then source.
So instead of your callback script being some endlessly long line, you would just have source opdef.?myScriptName.cmd
To add a script to a asset, right click on your asset and bring up the Operator Type Manager.
Then right click on it and pick “Edit Contents”
Under Section Name put the name of you script (myScriptName.cmd)
Then click Add Empty Section.
Now you can edit your script there. (Just remember to click apply to update your script.)
So instead of your callback script being some endlessly long line, you would just have source opdef.?myScriptName.cmd
To add a script to a asset, right click on your asset and bring up the Operator Type Manager.
Then right click on it and pick “Edit Contents”
Under Section Name put the name of you script (myScriptName.cmd)
Then click Add Empty Section.
Now you can edit your script there. (Just remember to click apply to update your script.)
if(coffees<2,round(float),float)
-
- Quick Links