SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 28/09/2012, 05:23 AM   #1
iHaze.
Huge Clucker
 
iHaze.'s Avatar
 
Join Date: Jun 2012
Location: Earth for a while.
Posts: 346
Reputation: 49
Default Undefined Symbol.

Hey, I'm Working on a zGaming edit, adding more 3 Factions, so when i did, i need the commands, when i try to make it, It needs [IsACop] or [IsAGov] Or [IsAReporter] So when i tried to [IsANG] Its giving me 2 errors

error 017: undefined symbol

And i cant find the defines!!

Any Help Please.
iHaze. is offline   Reply With Quote
Old 28/09/2012, 05:46 AM   #2
zDevon
Huge Clucker
 
Join Date: Jan 2012
Location: Charlotte, NC (USA)
Posts: 299
Reputation: 31
Default Re: Undefined Symbol.

Because you should be searching for stocks, not defines. I'm off to bed here in a few, so I can't provide the best of an explanation, but you can shoot me a PM and I'll get back to you in the morning.

I took the joy of having a quick snoop through the script you're editing, and wildly enough found these:
pawn Code:
stock IsAReporter(playerid)
{
    if(PlayerInfo[playerid][pFac] == 4) return 1;
    return 0;
}

stock IsACop(playerid)
{
    if(PlayerInfo[playerid][pFac] == 1) return 1;
    return 0;
}

stock IsAGov(playerid)
{
    if(PlayerInfo[playerid][pFac] == 2) return 1;
    return 0;
}

stock IsAHitman(playerid)
{
    if(PlayerInfo[playerid][pFac] == 3) return 1;
    return 0;
}

To cut to the chase, you should replicate these and adjust the ID to fit your needs. For example:
(it is safe to use these, simply edit the names to your new faction names and place this anywhere in your script)
pawn Code:
stock IsANG(playerid)
{
    if(PlayerInfo[playerid][pFac] == 5) return 1;
    return 0;
}

stock IsAFireFighter(playerid)
{
    if(PlayerInfo[playerid][pFac] == 6) return 1;
    return 0;
}

stock IsAMercenary(playerid)
{
    if(PlayerInfo[playerid][pFac] == 7) return 1;
    return 0;
}
zDevon is offline   Reply With Quote
Old 28/09/2012, 05:47 AM   #3
razor steven
Big Clucker
 
Join Date: Jun 2012
Posts: 71
Reputation: -4
Default Re: Undefined Symbol.

I was having the same problem...
__________________
United States Roleplay ~US:RP...

Awesome server with UNIQUE features.
Come and join US:RP today, Bet you're gonna love it.


212.227.143.24:8490

www.us-rp.com
razor steven is offline   Reply With Quote
Old 28/09/2012, 05:49 AM   #4
zDevon
Huge Clucker
 
Join Date: Jan 2012
Location: Charlotte, NC (USA)
Posts: 299
Reputation: 31
Default Re: Undefined Symbol.

Quote:
Originally Posted by razor steven View Post
You have to define them.

Code:
#Define IsANG
Please take in a little regard and actually read a person's problem before giving them misleading information.
zDevon is offline   Reply With Quote
Old 28/09/2012, 05:56 AM   #5
iHaze.
Huge Clucker
 
iHaze.'s Avatar
 
Join Date: Jun 2012
Location: Earth for a while.
Posts: 346
Reputation: 49
Default Re: Undefined Symbol.

Thanks zDevon, Its working, And For razor, i tried, but the command wont work.
iHaze. is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
undefined symbol i? TaLhA XIV Scripting Help 8 04/08/2012 10:09 PM
undefined symbol ++REP Tomer!.$ Scripting Help 12 07/04/2012 12:44 PM
How come this says undefined symbol? rangerxxll Scripting Help 7 14/09/2011 06:17 AM
[HELP]Undefined symbol errors when symbol is defined PCheriyan007 Help Archive 9 07/07/2011 01:09 AM
Undefined symbol GangsTa_ Help Archive 5 06/06/2010 05:13 AM


All times are GMT. The time now is 08:28 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.