Little Help - 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)
+--- Thread: Little Help (
/showthread.php?tid=648261)
Little Help -
Sanady - 18.01.2018
Hello I have few errors but I don`t see issue, can someone take a look into?
Код:
format(TextString, sizeof(TextString), "%s", TeamClasses[GetPlayerClass(playerid)][ClassName]); //error line
Код:
C:\Users\Ivan\Desktop\Server\SA-MP Server\gamemodes\./PwFItems/Textdraws/GUI.pwn(432) : error 017: undefined symbol "TeamClasses"
C:\Users\Ivan\Desktop\Server\SA-MP Server\gamemodes\./PwFItems/Textdraws/GUI.pwn(432) : warning 215: expression has no effect
C:\Users\Ivan\Desktop\Server\SA-MP Server\gamemodes\./PwFItems/Textdraws/GUI.pwn(432) : error 001: expected token: ";", but found "]"
C:\Users\Ivan\Desktop\Server\SA-MP Server\gamemodes\./PwFItems/Textdraws/GUI.pwn(432) : error 029: invalid expression, assumed zero
C:\Users\Ivan\Desktop\Server\SA-MP Server\gamemodes\./PwFItems/Textdraws/GUI.pwn(432) : fatal error 107: too many error messages on one line
Re: Little Help -
Manyula - 18.01.2018
I suppose it‘s because of the GetPlayerClass(playerid) used directly as an index. Try storing it in a temp variable and then put it into the array index.
Re: Little Help -
Sanady - 18.01.2018
Quote:
Originally Posted by Manyula
I suppose it‘s because of the GetPlayerClass(playerid) used directly as an index. Try storing it in a temp variable and then put it into the array index.
|
I tried that too but same error
Re: Little Help -
Manyula - 18.01.2018
How does your TeamClasses array look like exactly?
Re: Little Help -
jlalt - 19.01.2018
It says TeamClasses is not defined yet, I guess its a variable, right?
Be sure you've put its new defined before using it in the codes. [ put it in earlier line than the line you call it ]