my initial thoughts xiii, are that you make one object per friend.
eg:
vat $playername to $init_obj's name;
find $actor,$playername
if $found_if > 0 then foundfriend else end;
You can store a whole bunch of stuff in each friend object inside the dog eg:
var $patcount to $found_id's patcount;
(objects within objects!!)
Have fun now.
PS postmen does not deliver properly in staring room - must be something to do with it being treated as void in some instances too.. this must be my next thing to fix now I have a mostly functional postman :-)
----
Onk-onk wolis :)
The dog do its work now, i will now code the sub for master, then the next problem will be with updating an extra info storage...
So nice postman... have to see it more in detail, but first I post this reply.
Cow land is plenty of life :)
from xiii
--------------------
Hi xii,
Ahh.. main thing is you do this when looping through a list:
foreach in list do something;
##something:
if $list_line eq $init_obj's name then foundfriend else end;
The magical string variable $list_line is your current line while looping through the list.
from wolis.
-----------
:=((( manipulating loaded lists is ok when using $list[$item] in a message.
But when you use the same expression in a comparison like 'if $foo eq $list[$item] then...'
COWscript read only the $item's part of the expression as [$list[$item]] = [[$item]].
I tryied to use list[$item] as documented, but then I get the location which ID is $item. (even in the msg) <-- that could be the track to the bug.
Trying to put the expression in a $var before evaluating as another result, gives
the memory address :(
I give up now.
You can use doggy as you want to have further debug. doggy is a good dog ;)
simply go to window and then debug go to window again.
there is also a race condition with the display of the first debugging msg wich are in the script.
Messaging is very heavy.
Below piece of debug flow with that %$@!# memory address ;)
see also another bug recorded in book of work (DBI may be giving us the passwd of the database) :/
I did see it only once.
##lookforplayer:
var $frienditem to 0;
var $isafriend to 0;
load $actor's listoffriends;
foreach in list do continueforeach;
msg 0,$actor,0,0,"nothing","end of foreach";
if $isafriend eq 0 then isitmaster;
##continueforeach:
if $foreachstop eq 1 then continue else isitafriend;
##isitafriend:
msg 0,$actor,0,0,"nothing","listfriend.$frienditem = $list[$frienditem]";
var $tocompare to $list[$frienditem];
[DEBUG process_subs (isitafriend) [msg 0,$actor,0,0,"nothing","listfriend.$frienditem = $list[$frienditem]";var $tocompare to $list[$frienditem];msg 0,$actor,0,0,"nothing","[$init_obj] eq $list[$frienditem] ?";if [$init_obj] eq "$tocompare" then itisafriend;add 1 to $frienditem;msg 0,$actor,0,0,"nothing","$frienditem eq $list_count";]]
[DEBUG - process_subs - (msg 0,$actor,0,0,"nothing","listfriend.$frienditem = $list[$frienditem]") [to window] target=(1013)]
[DEBUG MSG add_msg(0,$actor,0,0,"nothing","listfriend.$frienditem = $list[$frienditem]")]
[DEBUG add_msg - 0,1349,0,0,"nothing","listfriend.1 = Josh",0,""]
[DEBUG add_msg - looking for rections to (loc in (0,1349,0,0) and code like '%##nothing:%')]
[DEBUG - process_subs - (var $tocompare to $list[$frienditem]) [to window] target=(1013)]
[DEBUG VAR [$tocompare]=[[1]]]
[DEBUG - process_subs - (msg 0,$actor,0,0,"nothing","[$init_obj] eq $list[$frienditem] ?") [to window] target=(1013)]
[DEBUG MSG add_msg(0,$actor,0,0,"nothing","[$init_obj] eq $list[$frienditem] ?")]
[DEBUG add_msg - 0,1349,0,0,"nothing","[1833] eq Josh ?",0,""]
[DEBUG add_msg - looking for rections to (loc in (0,1349,0,0) and code like '%##nothing:%')]
[DEBUG - process_subs - (if [$init_obj] eq "$tocompare" then itisafriend) [to window] target=(1013)]
[DEBUG IF1 [[$init_obj]] [eq] ["$tocompare"]]
[DEBUG IF2 ["[1833]"] [eq] ["ARRAY(0x833e70c)"]] <---------- :-(
[DEBUG IF3 itisafriend or ]