SA-MP Forums Archive
Undefined? :O - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Undefined? :O (/showthread.php?tid=100068)



Undefined? :O - Mike Garber - 02.10.2009

First, I want to ask, HOW THE F*CK can It cause errors on a line that's thousands of lines away where I'm scripting? :S
When It worked just fine before? :O

SendMessageToLawEnf();

pawn Код:
SendMessageToLawEnf(string);
Gives error error 017: undefined symbol "SendMessageToLawEnf".

Everywhere that code goes, until line 2700~, then there's no errors anymore,
even though there's loads of lines using that under.

And I wasn't even working NEAR neither that or the code below,
wich is called by the code above.

It have worked fine, until I added a few cars -_-


pawn Код:
SendMessageToLawEnf(const str[])
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i)) {
if (gteam[i]==Team_LSPD || gteam[i]==Team_Admin) {
SendClientMessage(i, COLOR_BLUE, str);
}
}
}
}



Re: Undefined? :O - HB - 02.10.2009

You probably forgot closing the spawning car function (; ).


Re: Undefined? :O - MenaceX^ - 02.10.2009

Quote:
Originally Posted by иєσz
You probably forgot closing the spawning car function (; ).
No, he didn't.
pawn Код:
SendMessageToLawEnf(const str[])
{
  for (new i = 0; i < MAX_PLAYERS; i++)
  {
    if (IsPlayerConnected(i))
    {
      if (gteam[i]==Team_LSPD || gteam[i]==Team_Admin)
      {
        SendClientMessage(i, COLOR_BLUE, str);
      }
    }
  }
}



Re: Undefined? :O - Mike Garber - 02.10.2009

pawn Код:
SendMessageToLawEnf(const str[])
{
  for (new i = 0; i < MAX_PLAYERS; i++)
  {
    if (IsPlayerConnected(i))
    {
      if (gteam[i]==Team_LSPD || gteam[i]==Team_Admin)
      {
        SendClientMessage(i, COLOR_BLUE, str);
      }
    }
  }
}
Still get the same errors :S


Re: Undefined? :O - Correlli - 02.10.2009

There's nothing wrong with this code, you probably missed a bracket somewhere else.


Re: Undefined? :O - Mike Garber - 02.10.2009

Impossible.
I deleted everything I did last time I scripted, and It's still the same error(s).

Код:
pawno\x.pwn(1779) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(1784) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(1793) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(1798) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(1826) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(1855) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(1879) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(1904) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(1928) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(2115) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(2166) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(2216) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(2259) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(2304) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(2339) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(2391) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(2431) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(2688) : error 017: undefined symbol "SendMessageToLawWhite"
pawno\x.pwn(2690) : error 017: undefined symbol "SendMessageToLawEnf"
pawno\x.pwn(2692) : error 017: undefined symbol "SendMessageToLawGrey"
pawno\x.pwn(2694) : error 017: undefined symbol "SendMessageToLawGrey"
pawno\x.pwn(2696) : error 017: undefined symbol "SendMessageToLawGrey"
pawno\x..pwn(2698) : error 017: undefined symbol "SendMessageToLawGrey"
pawno\x.pwn(2700) : error 017: undefined symbol "SendMessageToLawGrey"
pawno\x.pwn(2702) : error 017: undefined symbol "SendMessageToLawWhite"
pawno\x.pwn(2731) : error 017: undefined symbol "SendMessageToLawWhite"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

26 Errors.
And I was working on line 3000+, and added a few cars on line 900+...



Re: Undefined? :O - Pawno_Master - 02.10.2009

do you have more than 700 vehicles without a streamer?(just a background question)


Re: Undefined? :O - Mike Garber - 02.10.2009

No. I've got under 30 vehicles. (doing a gamemode from scratch)
BTW with 0.3 you can have unlimited vehicles, might didn't say I was scripting for 0.3 :S


Re: Undefined? :O - Battleskull - 03.10.2009

Quote:
Originally Posted by mavtias
No. I've got under 30 vehicles. (doing a gamemode from scratch)
BTW with 0.3 you can have unlimited vehicles, might didn't say I was scripting for 0.3 :S
this happened to me once i was missing a { or } somewhere


Re: Undefined? :O - virspector - 12.10.2009

I think i know why. Cuz something like this happened with me too....

Check your codes. Make sure it's not between #if FILTERSCRIPT_DEFINED (or something like that). Try finding with CTRL + F. Type "#endif". Now, if you found it, put the codes under it...

Hopez this is usefull + understandable