SA-MP Forums Archive
[Help] Array TXD Error - 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: [Help] Array TXD Error (/showthread.php?tid=661747)



[Help] Array TXD Error - ApolloScripter - 13.12.2018

why am I having these errors in my TXD?
Код:
SS/Core/Player/Commands.pwn(162) : error 033: array must be indexed (variable "ClassChanger")
SS/Core/Player/Commands.pwn(163) : error 035: argument type mismatch (argument 1)
SS/Core/Player/Commands.pwn(164) : error 035: argument type mismatch (argument 1)
SS/Core/Player/Commands.pwn(165) : error 035: argument type mismatch (argument 1)
SS/Core/Player/Commands.pwn(166) : error 035: argument type mismatch (argument 1)
SS/Core/Player/Commands.pwn(167) : error 035: argument type mismatch (argument 1)
SS/Core/Player/Commands.pwn(168) : error 035: argument type mismatch (argument 1)
SS/Core/Player/Commands.pwn(169) : error 035: argument type mismatch (argument 1)
SS/Core/Player/Commands.pwn(170) : error 035: argument type mismatch (argument 1)
SS/Core/Player/Commands.pwn(171) : error 035: argument type mismatch (argument 1)
PHP код:
    ClassChanger[1] = TextDrawCreate(405.500000111.633316"usebox");
    
TextDrawLetterSize(ClassChanger[1], 0.00000022.356815);
    
TextDrawTextSize(ClassChanger[1], 232.0000000.000000);
    
TextDrawAlignment(ClassChanger[1], 1);
    
TextDrawColor(ClassChanger[1], 0);
    
TextDrawUseBox(ClassChanger[1], true);
    
TextDrawBoxColor(ClassChanger[1], 102);
    
TextDrawSetShadow(ClassChanger[1], 0);
    
TextDrawSetOutline(ClassChanger[1], 0);
    
TextDrawFont(ClassChanger[1], 0); 
Definition:
PHP код:
new Text:ClassChanger[30]; 
OBS:this is only one part, the text draw occupies 27 spaces in the array.


Re: [Help] Array TXD Error - Threshold - 13.12.2018

The code compiles fine for me... but I couldn't help but notice that you're using Southclaw's (Or Southclaws', whatever he goes by nowadays) Scavenge and Survive mode. That particular gamemode happens to use modular coding.

First off, is the definition of 'ClassChanger' in the same file that you're creating the textdraw in?

Also, are you trying to compile the core script or Commands.pwn?