Problem description:
Hi been playing some RP game like Comics and i wanted to know how do i Click a player and make it show there stats like in HTML
#1 Aug 14 2012, 8:49 pm
|
|
You must first learn HTML. Then it's just a simple call to browse().
| |
#2 Aug 14 2012, 8:55 pm
|
||
so i did this it came out to have a runtime error i think it has something to do with the grass and M.client runtime error: undefined variable /turf/Grass/var/client proc name: Click (/mob/Click) usr: DarkW0lf (/mob) src: DarkW0lf (/mob) call stack: DarkW0lf (/mob): Click(Grass (1,1,1) (/turf/Grass), "mapwindow.map", "icon-x=19;icon-y=18;left=1;scr...") it happens when i click myself | ||
Remove your if() check and change it to world << M and see what you're actually clicking. Just a little debugging, you might figure something out.
| |
#4 Aug 14 2012, 9:13 pm
|
|
It says am clicking the Grass
runtime error: undefined variable /turf/Grass/var/key proc name: Click (/mob/Click) usr: DarkW0lf (/mob) src: DarkW0lf (/mob) call stack: DarkW0lf (/mob): Click(Grass (1,1,1) (/turf/Grass), "mapwindow.map", "icon-x=15;icon-y=21;left=1;scr...") Grass but when i click the grass not myself nothing happens | |
I guess you completely disregarded what I hoped you would figure out. You're checking for a variable that the grass doesn't have, the grass is a turf and turfs don't have a client/key variable.
| |
#6 Aug 14 2012, 9:18 pm
|
|
Thank u
| |
#7 Aug 14 2012, 10:07 pm
|
|
Now when i click the grass this appears
runtime error: undefined variable /turf/Grass/var/key proc name: Click (/client/Click) usr: DarkW0lf (/mob) src: DarkW0lf (/client) call stack: DarkW0lf (/client): Click(Grass (2,1,1) (/turf/Grass), Grass (2,1,1) (/turf/Grass), "mapwindow.map", "icon-x=26;icon-y=21;left=1;scr...") | |
#8 Aug 14 2012, 10:52 pm
|
|
Using an if() statement along with the ismob() proc would be beneficial here.
| |
#9 Aug 14 2012, 10:55 pm
|
|
Click() is a process, not a verb. It doesn't use verb arguments that the user can fill out. The first argument is actually the location of the object that was clicked.
For atom/Click(), src is the atom being clicked, and usr is the mob of the client that clicked it. | |
#10 Aug 14 2012, 11:04 pm
|
|
I don't really understand sir what you mean?
| |
#11 Aug 14 2012, 11:08 pm
|
||
This stops the runtime error and works but when you click the grass the mouse goes to loading icon | ||
Boubi wrote:
Using an if() statement along with the ismob() proc would be beneficial here. | |
#13 Aug 14 2012, 11:27 pm
|
|
Yeah thanks to Boubi i managed to fix this Thank You all for your help :D.
| |