Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HELP Need to convet code to be non static (I believe)

 
Jon Janouch
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I don't know if anyone can help me here, but I have been using these forums for help on my quest to create a private server of a game called runescape.
Ok basically I know what needs to be fixed but I do not know how to go about doing it. When 2 players access my shops at a different time the first person to open a shop ends up being switched into the one the second person opened up, now I believe this is do too the code is static for people using the openshop (I believe thats how i would say that), and it needs to be non static (I believe this is the problem). So if anyone could help that would be appreciated



 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jon,
Welcome to JavaRanch! I added code tags to make the post easier to read.

I don't see any statics in your code. What are you trying to get rid of?
 
Jon Janouch
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, we'll I was following a guide on how to add shops into my server and on there someone said that the reason when two ip access the shops on the server and it switches to show the same shop for the is because it is static, there is more coding involved I'll post it and see if maybe I just posted the wrong code, that was where I thought the problem was because it's the shop handler.














This is all the code involved in the shops
Here is the link of the guide I followed http://www.rune-server.org/showthread.php?t=184826&highlight=z508+shop
I didnt repost shop handler because I felt bad for posting all this code as it is

[Edit]Add line breaks because these long lines "fall off" the edge of my screen" CR[/edit]
 
Campbell Ritchie
Sheriff
Pie
Posts: 50211
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
too difficult for "beginning". Moving to our games forum.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50211
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure whether anybody here will be familiar with your problem, I am afraid.
Where did you get that code? The public access on those arrays looks very weird.
 
Jon Janouch
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
umm, what do you mean about look weird, They are not trying to access each other, they are calling a pawn other files within the game files, I don't know I'll try to explain the problem and maybe someone will understand, I have 5 shops shops on my server, and we'll say I got to open we'll call it the magic shop, I open it, and then you go and say open the archer shop, we'll I'm still viewing the magic shop once I go to buy an item it switches me to the range shop and buys the items that is within the archer shop. I guess this is the best I can explain it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic