Jump to content
  • 0

Problema textdraw join/leave


Andrey003

Question

Problemă întâlnită (descriere): Nu merge sa pun Textdraw la join/leave pe server am gm PPC_Trucking
Ero(area / rile) / warning-(ul / urile):

[pawn]error 001: expected token: "-string end-", but found "-identifier-"
warning 213: tag mismatch
error 001: expected token: "-string end-", but found "-identifier-"
expected token: "-string end-", but found "-identifier-"
expected token: "-string end-", but found "-identifier-"
error 001: expected token: "-string end-", but found "-identifier-"[/pawn]

Liniile de cod / sursa / script-ul: asta am in gm pentru join si apare in consola 

[pawn]APlayerData[playerid][TXT_PlayerJoinedServer] = TextDrawCreate(250.0, 426.0, " ");
TextDrawAlignment(APlayerData[playerid][TXT_PlayerJoinedServer], 2);
TextDrawUseBox(APlayerData[playerid][TXT_PlayerJoinedServer], 1);
TextDrawBoxColor(APlayerData[playerid][TXT_PlayerJoinedServer], 0x00000066);
TextDrawFont(APlayerData[playerid][TXT_PlayerJoinedServer], 0);[/pawn]

 

Imagini / Video (optional): -
Aţi încercat să rezolvaţi singur?: nu stiu cum

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

L-ai definit, dar trebuie sa fie ori in enum ori il faci variabila. Si trebuie sa aiba prefixul Text:

 

Acolo doar ai creeat textdraw-ul. Ca sa si afisezi e mai mult de facut. Trebuie sa ii setezi si text-ul, etc..

 

Topic inchis a fost creat un tutorial pentru asta!

 

Link to comment
Share on other sites

errorile:
(227) : error 001: expected token: "-string end-", but found "-identifier-"
(227) : warning 213: tag mismatch
(228) : error 001: expected token: "-string end-", but found "-identifier-"
(229) : error 001: expected token: "-string end-", but found "-identifier-"
(230) : error 001: expected token: "-string end-", but found "-identifier-"
(231) : error 001: expected token: "-string end-", but found "-identifier-"
 
liniile:sunt cele de mai sus de la 227 pana la 231
Link to comment
Share on other sites

Nu asa se defineste.

 

Pune-o in enum sau pune-o asa

 

[pawn]

new Text:PlayerJoinedServerTextDraw[MAX_PLAYERS];

[/pawn] si modifica tot ce ai cu [pawn]APlayerData[playerid][TXT_PlayerJoinedServer][/pawn] in ce ti-am dat eu.

Link to comment
Share on other sites

deci am pus la enum asta

  •  
  • new Text:PlayerJoinedServerTextDraw[MAX_PLAYERS]

iar in loc de asta 

[pawn]APlayerData[playerid][TXT_PlayerJoinedServer] = TextDrawCreate(250.0, 426.0, " ");
TextDrawAlignment(APlayerData[playerid][TXT_PlayerJoinedServer], 2);
TextDrawUseBox(APlayerData[playerid][TXT_PlayerJoinedServer], 1);
TextDrawBoxColor(APlayerData[playerid][TXT_PlayerJoinedServer], 0x00000066);
TextDrawFont(APlayerData[playerid][TXT_PlayerJoinedServer], 0);
[/pawn] 
am pus doar
[pawn]APlayerData[playerid][TXT_PlayerJoinedServer];[/pawn]

 

iar acum am erorile astea :

(228) : error 001: expected token: "-string end-", but found "-identifier-"
(228) : warning 215: expression has no effect
 
si linia 228 este:
[pawn]APlayerData[playerid][TXT_PlayerJoinedServer];[/pawn]
Link to comment
Share on other sites

Deci, sterge linia [pawn]new APlayerData;
[/pawn]

 

si inlocuieste-o cu asta

 

[pawn]new Text:PlayerJoinedServerTextDraw[MAX_PLAYERS];[/pawn]

 

Iar peste tot pe unde ai

 

[pawn]APlayerData[playerid][TXT_PlayerJoinedServer][/pawn]

 

schimbi in

 

[pawn]PlayerJoinedServerTextDraw[playerid][/pawn]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.