so i post my little code that i believe can help him.. ill post the code at the bottom in case u guys wanna compare mine to his...
now what gets me annoyed and the reason im ranting is because this guy replies(someone new not the person who posted the topic) that i shouldn't try to help ppl until i learn more about the programming.. because the code i posted was bad.. really bad... i dunno this coz its the way i always solve my coding problems.. i jus fix it little by litle.. nyway, he goes on to say tht my code is bad and tht its not being done properly... but my code solved every problem tht guy put forward (although anyone whos seen the post can agree he is a little vague about what he wants specifically), that aside my code fixed his problems (as best i understood them) and worked perfectly... the only issue the other guy had was tht my code wasnt "done properly", whatever tht actually means.
i then says to him, that i cna see his point of view about people not wanting "bad codes" posted around the forums coz it makes the people who do it "properly" upset, and yea i can totally agree with tht, so i ask him to make post his proper"version of the coding onto the post and ill delete my "bad codes".. Well, i see his post, and it can still be found there as far as im aware, and i couldnt understand half of whats going on because i aint a proper prgrammer.. i dunno how to use args and list lengths etc... even his notation isnt particularly hlpful in what is actually going on.. also one issue springs to mind... the guy asking for help wanted it so that there could not be any duplicated results... his coding was that there are 2 lists, u pick a andom thing from each list, combine them then assign it to a mob.. and he didn want any duplications... so my code (as you can see) will not allow the duplication to be selected, the other guys tho , the "proper" codes, only stop a duplication in the list.. it doesnt stop a duplication from hapening, so although the list wont say "1","2","2","3", 2 people can actually have 2 as a variable.. which is what the guy didnt want... so thts why im ranting and i jus want sum feedback from coders out there.. if u were new (as i assume the guy asking for help is a little bit) would you prefer the code submitted on the topic or my code submitted below...
B.T.W this is just a rant, i dont want anybody making a huge dela out of this its more jus me wanting to get it off my chest rather than nything be done.. but feel free to reply anyway xD
heres the code:
var/list/Combos = list() //the list of combinations
var/list/Partone = list("hi","hello","whatever") //list 1
var/list/Parttwo = list("bob","jim","guy") // list 2
mob
var
selection = "" // what has been selected for them
verb
Combine()
usr.Combineproc() // the proc (always good to have procs.. just incase)
usr.verbs -= /mob/verb/Combine //remove the verb so we know its worked
proc
Combineproc() // the proc
var/A
A=pick(Partone) //random from list 1
var/B
B=pick(Parttwo) // random from list 2
usr.selection = "[A] [B]" // there selection is A and B
if(usr.selection in Combos) // if selection already exists
usr.Combineproc() // rerun the proc.. no duplicates!!
else // if not a duplicate
Combos += usr.selection // add it to the list
return
verb
Stalk() // the stalking bit u mentioned (again a verb and a proc)
var/K //why K.. i have no idea
K=input("Which combination will u stalk?","")in Combos // select a made combination from combos
for(var/mob/M in world) // check every mob
if(M.selection==K) // if there selection is what you chose
M << "Someone is stalking you" // theres ya
else //if not
return // return to whatever
Stat() //jus sum stats too see if everything is working
statpanel("Your Selection") //jus to see what our selection is
stat("[usr.selection]","")
statpanel("All combinations") // all combos created so far
stat(Combos)
much appreciated