| Scripting help, defining symbols/if statements | |
|
|
Author | Message |
---|
Yepperson Server Developer
Posts : 618
| Subject: Scripting help, defining symbols/if statements Thu Feb 06, 2014 2:33 pm | |
| Hello guys I'm currently learning how to script in PAWNO. I'm still a "noob" but I already made some of my own.
Anyways, I copied a /drag command script from another gamemode. Now, I had to debug some things about it but it seems not to be working.- script screenshot:
The following errors are given to me: - Code:
-
dragcommand.pwn(13) : error 017: undefined symbol "ProxDetectorS"
dragcommand.pwn(16) : error 017: undefined symbol "gTeam"
dragcommand.pwn(16) : warning 215: expression has no effect
dragcommand.pwn(16) : error 001: expected token: ";", but found "]"
dragcommand.pwn(16) : error 029: invalid expression, assumed zero
dragcommand.pwn(16) : fatal error 107: too many error messages on one line My question to you is, how do I define the undefined symbols? And I can't seem to find Error 001, 029 and warning 215.
Last edited by Bible on Thu Feb 06, 2014 3:24 pm; edited 1 time in total | |
|
| |
nightmare Senior
Posts : 513
| Subject: Re: Scripting help, defining symbols/if statements Thu Feb 06, 2014 3:07 pm | |
| Uhm..that script seems kinda messy.. lol
| |
|
| |
Yepperson Server Developer
Posts : 618
| Subject: Re: Scripting help, defining symbols/if statements Thu Feb 06, 2014 3:23 pm | |
| - Nightmare wrote:
- Uhm..that script seems kinda messy.. lol
I just noticed that a piece of the left part isn't on the screenshot. Anyway, I didn't make it. It's a copy of a gamemode I got from the SA-MP forums.
Again, I'm still a noob and I can't seem to find a tutorial for those undefined symbols. | |
|
| |
nightmare Senior
Posts : 513
| Subject: Re: Scripting help, defining symbols/if statements Thu Feb 06, 2014 4:02 pm | |
| Most of the samp forum scripts are full of bugs, scripting errors, etc. I'm not pro on that scripting thing but I'll look into that script when I get on my desktop pc (I'm on my phone atm) | |
|
| |
Yepperson Server Developer
Posts : 618
| Subject: Re: Scripting help, defining symbols/if statements Thu Feb 06, 2014 4:19 pm | |
| My main question is: How do I define the symbols shown in the screenshot and given in the error(s).
Thanks in advance. | |
|
| |
nightmare Senior
Posts : 513
| Subject: Re: Scripting help, defining symbols/if statements Thu Feb 06, 2014 4:31 pm | |
| I'll try to find out what's up with those symbols soon, I'll be on my PC shorty... But just an advise, you should ask this in SAMP forums; don't ask a bunch of fools(excluding me), ask a wise man. lol joke, but you know what I mean. | |
|
| |
Yepperson Server Developer
Posts : 618
| Subject: Re: Scripting help, defining symbols/if statements Thu Feb 06, 2014 4:38 pm | |
| - Nightmare wrote:
- I'll try to find out what's up with those symbols soon, I'll be on my PC shorty... But just an advise, you should ask this in SAMP forums; don't ask a bunch of fools(excluding me), ask a wise man. lol joke, but you know what I mean.
My account is not yet approved, that's the reason. | |
|
| |
Compton/Kollay WCL Founder
Posts : 3340 Location : Los Santos
| Subject: Re: Scripting help, defining symbols/if statements Thu Feb 06, 2014 4:47 pm | |
| You don't have gTeam and ProxDetector defined in your script, it should be hidden up in a stock someplace at the bottom of the script that you copied from, find the defentions of these two things in the script and you'll be fine. | |
|
| |
Yepperson Server Developer
Posts : 618
| Subject: Re: Scripting help, defining symbols/if statements Thu Feb 06, 2014 5:20 pm | |
| - Kompot wrote:
- You don't have gTeam and ProxDetector defined in your script, it should be hidden up in a stock someplace at the bottom of the script that you copied from, find the defentions of these two things in the script and you'll be fine.
That was the case. I basically have to stock every unused "symbol"? And if I'm correct stocking means explaining in PAWNO, right? | |
|
| |
Compton/Kollay WCL Founder
Posts : 3340 Location : Los Santos
| Subject: Re: Scripting help, defining symbols/if statements Thu Feb 06, 2014 5:33 pm | |
| To not write the whole script of ProxDetector for example over and over again you stock it someplace where you feel like, so when you will need the ProxDetector script, you can just type in a ProxDetector line, plus it helps to add new things to the script ye. | |
|
| |
Yepperson Server Developer
Posts : 618
| Subject: Re: Scripting help, defining symbols/if statements Thu Feb 06, 2014 5:56 pm | |
| - Kompot wrote:
- To not write the whole script of ProxDetector for example over and over again you stock it someplace where you feel like, so when you will need the ProxDetector script, you can just type in a ProxDetector line, plus it helps to add new things to the script ye.
Thank you, Compton! | |
|
| |
Tuck Silver Donator
Posts : 1027
| Subject: Re: Scripting help, defining symbols/if statements Thu Feb 06, 2014 6:35 pm | |
| Good luck with learning basics. | |
|
| |
Yepperson Server Developer
Posts : 618
| Subject: Re: Scripting help, defining symbols/if statements Thu Feb 06, 2014 6:40 pm | |
| - tuck wrote:
- Good luck with learning basics.
Thank you, I will need it. The basics are relatively hard.
Although I already know how to make commands. Hehe.
Anyways this topic is solved. | |
|
| |
Compton/Kollay WCL Founder
Posts : 3340 Location : Los Santos
| Subject: Re: Scripting help, defining symbols/if statements Thu Feb 06, 2014 6:55 pm | |
| if(strcmp(cmd,"/lockt",true)==0) { SendClientMessage(playerid,0xFFF700,"Locked"); return 1; } | |
|
| |
Sponsored content
| Subject: Re: Scripting help, defining symbols/if statements | |
| |
|
| |
| Scripting help, defining symbols/if statements | |
|