SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/07/2019, 10:26 AM   #1
PemburuHantu
Big Clucker
 
PemburuHantu's Avatar
 
Join Date: May 2019
Location: Indonesia ( Gorontalo )
Posts: 65
Reputation: 0
Default error textdraw

i cant found the error, someone help me ?
PHP Code:
    new stats[128]
    
format(statssizeof(stats), "DM_Score_%d_FR_Score_%d_Duel_Score_%d_~n~Total_score_%d_Admin_%d_vip_%d_"PlayerInfo[playerid][pDeathmatchScore], PlayerInfo[playerid][pKills], PlayerInfo[playerid][DuelScore], PlayerInfo[playerid][pDeathmatchScore] + PlayerInfo[playerid][pKills] + PlayerInfo[playerid][DuelScore], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pVip]));
    
StatsTextdraw[playerid] = TextDrawCreate(461.1111751.259231stats);
    
TextDrawLetterSize(StatsTextdraw[playerid], 0.2000001.000000);
    
TextDrawAlignment(StatsTextdraw[playerid], 1);
    
TextDrawColor(StatsTextdraw[playerid], 8388863);
    
TextDrawSetShadow(StatsTextdraw[playerid], 0);
    
TextDrawSetOutline(StatsTextdraw[playerid], 1);
    
TextDrawBackgroundColor(StatsTextdraw[playerid], 255);
    
TextDrawFont(StatsTextdraw[playerid], 2);
    
TextDrawSetProportional(StatsTextdraw[playerid], 1);
    
TextDrawSetShadow(StatsTextdraw[playerid], 0); 
PHP Code:
gamemodes\freeroam.pwn(2314) : error 001expected token";"but found "-identifier-"
gamemodes\freeroam.pwn(2314) : error 001expected token";"but found ")"
gamemodes\freeroam.pwn(2314) : error 029invalid expressionassumed zero
gamemodes
\freeroam.pwn(2314) : fatal error 107too many error messages on one line

Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


4 Errors

PemburuHantu is offline   Reply With Quote
Old 16/07/2019, 10:50 AM   #2
Mugala
High-roller
 
Mugala's Avatar
 
Join Date: Nov 2012
Location: Georgia, Tbilisi
Posts: 1,006
Reputation: 48
Default Re: error textdraw

remove one ) from format line.

format(stats, sizeof(stats), "DM_Score_%d_FR_Score_%d_Duel_Score_%d_~n~Total_sc ore_%d_Admin_%d_vip_%d_", PlayerInfo[playerid][pDeathmatchScore], PlayerInfo[playerid][pKills], PlayerInfo[playerid][DuelScore], PlayerInfo[playerid][pDeathmatchScore] + PlayerInfo[playerid][pKills] + PlayerInfo[playerid][DuelScore], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pVip]));

I marked it red.
so correct code will be like this
PHP Code:
format(statssizeof(stats), "DM_Score_%d_FR_Score_%d_Duel_Score_%d_~n~Total_score_%d_Admin_%d_vip_%d_"PlayerInfo[playerid][pDeathmatchScore], PlayerInfo[playerid][pKills], PlayerInfo[playerid][DuelScore], PlayerInfo[playerid][pDeathmatchScore] + PlayerInfo[playerid][pKills] + PlayerInfo[playerid][DuelScore], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pVip]); 
__________________
hang in there, help is on the way.
Mugala is offline   Reply With Quote
Old 16/07/2019, 11:15 AM   #3
PemburuHantu
Big Clucker
 
PemburuHantu's Avatar
 
Join Date: May 2019
Location: Indonesia ( Gorontalo )
Posts: 65
Reputation: 0
Default Re: error textdraw

Quote:
Originally Posted by Mugala View Post
remove one ) from format line.

format(stats, sizeof(stats), "DM_Score_%d_FR_Score_%d_Duel_Score_%d_~n~Total_sc ore_%d_Admin_%d_vip_%d_", PlayerInfo[playerid][pDeathmatchScore], PlayerInfo[playerid][pKills], PlayerInfo[playerid][DuelScore], PlayerInfo[playerid][pDeathmatchScore] + PlayerInfo[playerid][pKills] + PlayerInfo[playerid][DuelScore], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pVip]));

I marked it red.
so correct code will be like this
PHP Code:
format(statssizeof(stats), "DM_Score_%d_FR_Score_%d_Duel_Score_%d_~n~Total_score_%d_Admin_%d_vip_%d_"PlayerInfo[playerid][pDeathmatchScore], PlayerInfo[playerid][pKills], PlayerInfo[playerid][DuelScore], PlayerInfo[playerid][pDeathmatchScore] + PlayerInfo[playerid][pKills] + PlayerInfo[playerid][DuelScore], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pVip]); 
thank u mugala !
PemburuHantu is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
textdraw error itachi Scripting Help 4 31/12/2015 12:08 PM
Textdraw error Joshswag Scripting Help 8 22/11/2012 05:02 AM
Textdraw Error![0.3c] nGen.SoNNy Help Archive 7 22/12/2010 09:18 AM
Textdraw=>-need help some error Joe2009 Help Archive 7 25/06/2009 06:06 PM


All times are GMT. The time now is 09:56 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.