Little Help
#1

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
Reply
#2

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.
Reply
#3

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
Reply
#4

How does your TeamClasses array look like exactly?
Reply
#5

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 ]
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)