![]() |
hasweapon()
I'm just trying to make a warp ring. The weapon itself is fine, it's the place where you pick it up i'm having trouble with.
I'm trying to use hasweapon(Warp Ring) to decide whether to show or hide the pickup npc. like this: NPC Code: It works fine offline.. but as soon as i upload the level it wont work. Do i need to do something else to get this to work properly? |
|
what's wrong with that?
Should i have braces around the show and hide? If so, why? In other languages it's poor convention to use begin and end when there is only one line after the condition. |
Your weak link is, this is #gscript. What I really think he was reffering to is your placement of the hide; next to your if statement , and the &&.
|
Quote:
|
Ok. Thanks. I added the braces and it works now.
|
Quote:
|
I believe Kai is referring to your If statement. He might not mean this, but I think you should change it to nested 'If' statements instead of connecting two predominantly detached events.
|
Quote:
|
Quote:
|
Should be
NPC Code: Kai: helping someone with their scripts is more important than some scripting guide :/ Sorry but such answers are pissing me |
Quote:
Also: Even if he didn't take my advice - even if I didn't help him - did I actually harm him in any way? Did I obstruct his progression or make fun of his difficulties? I may not have contributed in the way that you would prefer, but I certainly didn't do anything bad. |
Quote:
Quote:
|
Quote:
|
Quote:
|
Quote:
|
He posted the part that was giving him trouble, Stefan didn't make the warp ring for him. That is why I said that to Fry. What the heck are you saying; how am I saying otherwise?
|
I dont know who made that rule, but giving someone a whole script when asked would not be a good idea, but when someone posts a script, and asks what is wrong with it, I see nothing wrong with someone showing them what they are doing wrong, showing the correct script, and then explaining what they did and why..there is no loss of learning there, and it isnt like they would be asking for an entire script to be handed to them. I know how frustrating it is to try to get a script working, and not being able to do it. I would never bring my question here because I know I wouldn't get help, and that's sad....
|
That rule I belive, like I said in my second last post, is so people dont come here looking for whole scripts. Like, for example, comming on here saying I need a Door scripted. Can someone make me a door? OH! How about making me a RC Car too!
But taking the piece of script that is giving you the trouble here, and asking for some help is alright. That is how it should be. |
Quote:
|
Quote:
Now, what has he learned of it? Stefan didn't tell him what was wrong and it doesn't seem like he read the KSI-GS which would've solved his problem. It doesn't look like he learned anything of it so he is always going to ask for someone to fix his scripts and is never going to know what exactly the problem with it was. |
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Alright, maybe I have my terms mixed up? What do you call the process of "improving the readability of a code"?
|
Quote:
|
| All times are GMT +2. The time now is 08:49 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.