|
Post by TinSoldier on Mar 22, 2017 9:13:30 GMT
Came across a funny issue.. When ever i was using iNetPlayerId(int) on the server to identify when a client had connected, i assumed this would work - if(iNetPlayerId(1)> -1) do something; turns out that's wrong, you should instead use if(iNetPlayerId(1)!= -99999) do something;
The problem here is 3drad assigns random client numbers with 9 digits and they could be positive or negative... Sooo testing for > -1 would indeed produce random results and probably explains why my icon project was randomly working or not... and the darn help files mention the special -99999 value returned for off-line clients.... Sooo i'll be checking and updating that real soon and hope that is indeed the issue.. And here i thought i knew everything
|
|
|
Post by indiedev on Mar 23, 2017 12:49:35 GMT
...so you blamed rad for your problems and was ready to quit, but it was actually just your dodgy scripting? [no offence, you are 1 of the top scripters on here, unlike me] but more often then not, custom user input is likely the culprit, so don't assume anything will work unless using built in objects or example scripts i reckon, anything else and you are just asking for trouble - similar thing happened with your tank wheels - so either break the cycle of bugs, or expect that sort of thing happening frequently with custom scripts, it's all part of the fun right!?
|
|
|
Post by NicusorN5 on Mar 23, 2017 13:03:15 GMT
Came across a funny issue.. When ever i was using iNetPlayerId(int) on the server to identify when a client had connected, i assumed this would work - if(iNetPlayerId(1)> -1) do something; turns out that's wrong, you should instead use if(iNetPlayerId(1)!= -99999) do something;
The problem here is 3drad assigns random client numbers with 9 digits and they could be positive or negative... Sooo testing for > -1 would indeed produce random results and probably explains why my icon project was randomly working or not... and the darn help files mention the special -99999 value returned for off-line clients.... Sooo i'll be checking and updating that real soon and hope that is indeed the issue.. And here i thought i knew everything This kind of things happend to me in 3DRadSpace ...
|
|
|
Post by TinSoldier on Mar 23, 2017 16:28:12 GMT
indiedev Well yes and no.. This was indeed a scripting issue on my part for assuming how the iNetPlayerId(int) command worked, and turned out that i was wrong. I'm glad you mentioned the tank wheel issue.. This wasn't my problem, i didn't write the script that is causing the issue there, the script was written by a accomplished scripter and produced no errors and worked properly in the project. The problems i had were caused by 3drads use of the script, which it didn't seem to like and didn't produce any errors directly. The skinmesh issue was a by product of something going wrong that directly involved the script, but where the script has no control or interaction with those skinmesh objects, the script controls the tank, but the skinmesh are attached to the wheels of the tank, like any car object can have, and i haven't yet identified where the issue is. And it's interesting to note that i've seen issues with the skinmesh object before and have no reason why that happened, and i have a screen capture of the skinmesh properties showing the damage that 3drad created. I have to assume 3drad is at fault here because other wise it means i did something that caused the physical damage to the project.... if that's true... what can i say.. 3drads error system is also broken 90% of the time... i cant exactly take all the blame here, i'm not perfect and 3drad is not helping as much as it could / should with a broken error system.
|
|
|
Post by indiedev on Mar 26, 2017 13:46:21 GMT
well i think it's better to finish a simple project, than to never finish a complex one, there comes a time when you have to ask is it worth battling an issue for too long? so then either remove it from the game totally or simplify it somehow, that way you can move on to finish it, unless it's a critical part of the game of course. -good luck.
|
|