the code i used is:
mob/Logout()
for(var/obj/balls/O in src.contents)
del(O)
..()
does the user need to log out of the game a certain way, i just use the X at the top right but when i log back in the ball is still in my contents =\ any more help? also a part of my GM code is:
Gather()
set category = "Gm SkiLlS"
usr << "You get the ball
for(var/obj/balls/O in world)
del(O)
usr.contents += new /obj/balls/soccerball
this works fine, it take the ball out of other players contents also, so im thinking the problem in the "logout" code is either in the first line or i need something to replace "src.contents" in the 2nd line, any help?
ID:179365
Jan 13 2002, 2:38 pm
|
|
Jan 13 2002, 3:42 pm
|
|
This should work:
|
In response to Nadrew
|
|
ive simplified it down and just want to display a message when the user leaves just so i know something is happening when im testing it, but not even this works
mob Login() src.loc = locate(2,1,1) src << "Konin" world << " [usr] Has Entered!" Logout() world << " [src] Has Left!" ------------------------------OR---------------------------- mob Login() src.loc = locate(2,1,1) src << "Konin" world << " [usr] Has Entered!" mob Logout() world << " [src] Has Left!" |
In response to Rukawa
|
|
Is login working? And your logout proc will cause alot of "dead icons" on the map, and please don't make a dbz game. (I know you are!)
Also I see you're using "usr" in those proc which you shouldn't. |
In response to Nadrew
|
|
ok changing "usr" to "src" didnt do anything, and that was in my login proc. im requesting help on my logout proc were i have used "src". If you could just pay attention to my 2nd post there, if i can get that to work i can put the rest in.
Oh and ive already made 80% of a DBZ game which im not giving up on, this code however is not for that. Id appreciate any more help, its as if the program is completely ignoring the logout proc and when i compile there a 0 erros and 0 warnings. its a mystery to me =\ |
In response to Rukawa
|
|
You used "usr" in both procs, you just edited it to make me look stupid, and I won't help you anymore, because I have a feeling you're lying about this not going into a dbz game.
|
In response to Nadrew
|
|
Think whatever you want even if i was making a dbz game i wouldnt give your opinion of it a 2nd thought, why cant you just help instead of critisizing people. The lowdown on the code is i was looking throught guide and that helped a bit now im at the stage were it is reading the logout() before the login()..=\ i tried to make it really simple by putting this in its own file like from what the guide says "you can use this without having icons turf etc" and well new problem...this happens when i untick the saving file and run the game, if the save file is ticked then im back to Problem number one.
|