ID:139846
 
Code:
client/mouse_pointer_icon = 'mouse.dmi'


Problem description:
Well, it's not really a code problem but I didn't know where to put it. The problem is that i use a different mouse pointer icon. It all works fine and such on the map, but when I go and hover to the Stats, Inventory, Commands,.. Panel. The mouse pointer stays the custom one, which is great, but I can't click on the different panels and verbs then. Does anyone knows how to fix this?
If this isn't fixable, then it would be cool if someone told me how to only make it a custom mousepointer on the map and not the panels and verbs window.

Sincerely,
Raimo

You changed the mouse pointer for the client. The mouse for the entire skin you have. If you want to have it only change when you are on the map, look it over in the skin reference. Just hit CTRL+F to search out key words. Also, this is more of a developer How-To question, there isn't an issue with your code, you just don't know what you're doing.
In response to Darkjohn66
That's just the good thing about it, I want it for the whole skin. Not only for the map. But why can't I click on the panels and the verbs with the custom then? I need to go above to the things where you can select 'Text', 'Browser' and such to change it back to the normal pointer from Windows. And then I can click on the verbs and panels.

Sincerely,
Raimo.
In response to Raimo
Only change the mouse_pointer_icon when you have MouseEntered() certain Skin Id's.
In response to Darkjohn66
Could you explain me a little more about that?
In response to Raimo
Read the reference entry on MouseEntered().

http://www.byond.com/docs/ref/
In response to Darkjohn66
Okay, thanks.
I'm still learning. Sorry to bother you btw.
In response to Raimo
Darkjohn, i got another problem. But I feel like I'm spamming you then. This time it's something I can't seem to fix myself. It's says that a var is undefined, but it's defined in another code file. And I use the var in that code file also, and I don't get an error. Might wanna take a look? My msn is [email protected], so we can have faster communication.
In response to Raimo
Did you made sure that the variable you defined has the path of the type you are trying to access the variable from?
mob/player/var/hp = 9999  //  It's over 9000!


Some_Procedure(X) // Note no path defined. X is the argument sent
var/hp = X.hp // Will result in an error because X does not have a defined path,

var/mob/X <-- Still an error, our variable is defined under /mob/player

var/mob/player/X <-- X.hp will work correctly now.


var/(path)/(Var name)
In response to GhostAnime
The variable is defined like this:
mob/var
returned=0
In response to Raimo
You need to learn the basics. Anyways , what GhostAnime said. Your type path is wrong, for instance, you can't go:
mob/var/returned = 0

obj/The_Obj
Click()
returned = 1

You would have to do:
obj/The_Obj
Click(var/mob/M)
M.returned = 1



In response to Darkjohn66
Darkjohn66 wrote:
You need to learn the basics. Anyways , what GhostAnime said. Your type path is wrong, for instance, you can't go:
> mob/var/returned = 0
>
> obj/The_Obj
> Click()
> returned = 1
>

You would have to do:
> obj/The_Obj
> Click(var/mob/M)
> M.returned = 1
>


Click() doesn't pass the mob belonging to the player that did the clicking as an argument. Since mouse actions are only done by players, they're considered to be like verbs. Usr is okay to use, and is what you want to use in this case.
In response to Skyspark
Oops, I should've put that after Click(). Anyways, mob is the client's mob, which is called by usr, so it really doesn't make much of a difference, it's just easier to entirely not use Usr in any sort of proc IMO.
In response to Darkjohn66
This is the code with the var errors:
mob
var
trading = 0

mob
verb
Trade(mob/M in view(usr))
var/Pokemons = list()
var/Pokemons_2 = list()
for(var/mob/Pokemon/P in usr.pokemonlist)
Pokemons += P
for(var/mob/Pokemon/P2 in M.pokemonlist)
Pokemons_2 += P2

if(M.trading)
usr << "[M] is busy trading!"
return

if(usr.trading)
usr << "You are busy trading!"
return

M.trading = 1
usr.trading = 1

switch(alert(M,"[usr] wants to Trade with you! Do you want to Trade with [usr]?","Secure Trade","Yes","No"))
if("Yes")
var/mob/Pokemon = input("Please select the Pokemon you wish to Trade") in Pokemons
if(usr.pokemon==0)
usr << "You have no Pokemons to Trade!"
M.trading = 0
usr.trading = 0
return
if(P.returned==0)
usr << "You must return the Pokemon first!"
M.trading = 0
usr.trading = 0
return
switch(alert(M,"[usr] wishes to trade: [Pokemon]. Do you accept?","Secure Trade","Yes","No"))
if("Yes")
var/mob/Pokemon_2 = input("Please select the Pokemon you wish to Trade") in Pokemons_2
if(usr.pokemon==0)
M << "You have no Pokemons to Trade!"
M.trading = 0
usr.trading = 0
return
if(P.returned==0)
M << "You must return the Pokemon first!"
M.trading = 0
usr.trading = 0
return
switch(alert(usr,"[M] wishes to trade: [Pokemons_2]. Do you accept?","Secure Trade","Yes","No"))
if("Yes")
usr.pokemonlist -= Pokemon
M.pokemonlist -= Pokemon_2

usr.pokemonlist += Pokemon_2
M.pokemonlist += Pokemon

M.trading = 0
usr.trading = 0

usr << "Secure Trade Complete!"
M << "Secure Trade Complete!"
else
M.trading = 0
usr.trading = 0
M << "Trade has been Cancelled"
usr << "Trade has been Cancelled"
return
else
M.trading = 0
usr.trading = 0
M << "Trade has been Cancelled"
usr << "Trade has been Cancelled"
return
else
M.trading = 0
usr.trading = 0
M << "Trade has been Cancelled"
usr << "Trade has been Cancelled"
return


The first error comes here
                    if(P.returned==0)
usr << "You must return the Pokemon first!"
M.trading = 0
usr.trading = 0
return

and the second one here
                            if(P.returned==0)
M << "You must return the Pokemon first!"
M.trading = 0
usr.trading = 0
return
In response to Raimo
Where is P defined? When you reach the if(), is the 'P' variable still in scope? Does 'P' mean anything there?
In response to Skyspark
            for(var/mob/Pokemon/P in usr.pokemonlist)
In response to Darkjohn66
Darkjohn66 wrote:
Oops, I should've put that after Click(). Anyways, mob is the client's mob, which is called by usr, so it really doesn't make much of a difference, it's just easier to entirely not use Usr in any sort of proc IMO.

Son, this does not make a lick of sense. Have you been smoking the marry-joo-wanna?
In response to Raimo
Raimo wrote:
>             for(var/mob/Pokemon/P in usr.pokemonlist)
>


Yeah, which is
for(var/mob/Pokemon/P in usr.pokemonlist)
Pokemons += P
// Could do other stuff with P here!!
world << P.name

world << P.name // ?!? What's a 'P' ?


You have a variable P that you use inside a for loop. Outside of that loop, P doesn't mean anything. Ask yourself what you mean when you type 'P' later on, and see if you already have a variable containing what you want, or if you have to go looking for something.