![]() |
Dilema...
I seem to be having a problem with my mineral mining scripts.
The NPC weapon is fine for the most part...it retrieves the player's ID and then sends it through triggeraction. NPC Code://#CLIENTSIDE The problem is the mineral NPC (which is a class NPC script) is not accepting the playerid parameter sent through triggeraction NPC Code: Neither of these are confidentail scripts, so I don't mind showing them :D There's probably something wrong that I'm doing...hopefully I can get this fixed fast :) |
this.hitterid = strtofloat(#p(2));
u had this line in it and there is NO #p(2) it's #p(1) like u used it later if I am not totaly wrong ^_^ |
you would be correct
|
Quote:
#p(index) gets the parameters from the specified index in triggeraction. The reason I had it #p(2) was because I was testing other indexes...even #p(1) returned a value of 0. |
hmm...I take back what I said about it not returning a value for
#p(1). However, it still fails to identify the player's ID for later parts of the script. I suppose it'll work fine if I use this.hitterid instead of hitter since the gethitter function does not seem to work like it should :/ |
Quote:
|
Quote:
Hmm, would the fact that've spent nearly half an hour trying to get it to work right, count? The NPC weapon works fine, just that the class script does not...but as I said, I could probably do without that function...just there will be less security. |
Quote:
|
Quote:
All I know is that: NPC Code: is not working for whatever reason :p |
Quote:
I've made it check i...returns 0 I've made it check hitter...returns 0 The only value that returns correctly is this.hitterid |
Quote:
|
Quote:
It still does not properly save the player's ID to the variable hitter. |
G Yoshi, simply use the actionplayer variable.
|
If you like, you can log onto my PW and I'll warp you to the Mineral Mines so you can see it.
|
Quote:
|
Quote:
Something new to learn :D |
Quote:
and u missed a bracket here: NPC Code: and this part: NPC Code: needs another bracket too NPC Code: |
Quote:
As for not closing the parenthesis...I would have caught that eventually, but thank you just the same :) |
Well if that is the only part that returns correctly, than that must mean that there is some sort of problem in the returning process. Maybe you sould (if all else fails) try using different function/variable names, because many times I have been haing the same problem and i have found that i accidently stumbled onto a keyword (reserved). Also you could do multiple things to test it, every time you go to the nest stage of something, have it add 1 to this.breakingpoint, and wherever it stops, post that and maybe we can help more.
If you are not sure what is wrong with your script, instead of posting the entire thing without any definition, you could do something like saying, "The problem seems to be ing the hitterid area", and you could put that part of the script in bold. If you do not do this, when it is posted people get frustrated as seen here by Kaimetsu and they refuse to help. For example when i first came here, I looked for what you said was happening, since you gave no definition of what was going wrong, I ignored the script and looked at the next posts to see if they had any clue. If there was a bold part, or a bold comment line in the script that said something like "Its somewhere in here" than i would be more attracted to help. Or even tell us what IS working so we can look at what is not. Just information for future reference. ;) |
Quote:
|
Quote:
|
| All times are GMT +2. The time now is 12:26 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.