how do u use scar to make tha randome name picker thng they use in the daily giveaway? i could use a script like that for something else.
you would be able to do it, but it wouldnt be like the daily giveaway because it wouldnt use the internet to get the list, it would need a pre-loaded list. if thats ok i can tell you the code you need to use, otherwise you could use vb or perl like the neofriends one
yeh the pre-loaded list is wat i had in mind. i can add & remove ppl that way on the list. yes the scar code would be excellent if u can pm it to me
i might make something like this and release the code the only thing i can say is that you'll need a recent scar (3.0+) to use it with unless you have already got srl
doesnt 3.0 have a problem that messes up windows really bad? i keep seeing that in my old version that i have now.
only if you use a certain function in it 3.06 works fine though Code (Text): program NamePicker; {include.SRL/SRL.scar} procedure Pickname; begin Case Random(7) of 0: writeln('Abba'); 1: writeln('Acca'); 2: writeln('Adda'); 3: writeln('Arra'); 4: writeln('Agga'); 5: writeln('Ahha'); 6: writeln('Awwa'); end; end; begin pickname; end.
thx chelsea1 now im gonna try it .. i see it works.. it picks random to desire name you put every writeln.. I used this an example: Code (Text): program NamePicker; {include.SRL/SRL.scar} procedure Pickname; begin Case Random(7) of 0: writeln('Expon'); 1: writeln('Chelsea1'); 2: writeln('PandaHorde'); 3: writeln('SonOfChilly'); 4: writeln('Billy_bob_joe'); 5: writeln('Marlene'); 6: writeln('Joe_kick_ass'); end; end; begin pickname; end. and the result is this.. Code (Text): Successfully compiled Billy_bob_joe Successfully executed so yeah ... billy_bob_joe wins my example give away.
glad you like it you can add others to the bottom as long as you change the number in the Code (Text): random(7)
I don't really like using a case statement for something like what he wants. Suppose he has 200 entries, and then he wants to delete entry 100. I don't know how SCAR works, but the best change would then be to make the last entry (200) changed to 100 to fill the gap. Then, suppose some more random entries in the middle get deleted, then you will have a lot of random numbers at the end of your case statement, and it will get really confusing as to what numbers are taken and which ones are free. The best solution is to read in the entries from a file, but I do not know if SCAR supports that. The next best solution would be to use an array, and add each entry without specifying an index so that they are allocated at compile / runtime. Then choose a random number between 0 and the array length minus one. Like I said though, I don't really know SCAR so they may not support these features.