SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 22/09/2019, 08:56 AM   #1
SecretB
Little Clucker
 
Join Date: Jul 2015
Posts: 14
Reputation: 0
Default Multiple Errors

Hey, so i have been trying to fixing a backpack system but i get these errors in my code :
PHP Code:
C:\Users\Marc\Desktop\Active Gaming Roleplay (FL EDITION)\gamemodes\agrp.pwn(7449 -- 7454) : error 012invalid function callnot a valid address
C
:\Users\Marc\Desktop\Active Gaming Roleplay (FL EDITION)\gamemodes\agrp.pwn(7454) : warning 217loose indentation
C
:\Users\Marc\Desktop\Active Gaming Roleplay (FL EDITION)\gamemodes\agrp.pwn(7454) : warning 215expression has no effect
C
:\Users\Marc\Desktop\Active Gaming Roleplay (FL EDITION)\gamemodes\agrp.pwn(7454) : error 001expected token";"but found ")"
C:\Users\Marc\Desktop\Active Gaming Roleplay (FL EDITION)\gamemodes\agrp.pwn(7454) : error 029invalid expressionassumed zero
C
:\Users\Marc\Desktop\Active Gaming Roleplay (FL EDITION)\gamemodes\agrp.pwn(7454) : fatal error 107too many error messages on one line 
The initial code is:
PHP Code:
stock ShowPlayerBackpack(playerid)
{
    new 
stringex[2000], index GetPlayerBackpackID(playerid),title[64];
    if(!
PlayerHasBackpack(playerid)) return SendClientMessageEx(playeridCOLOR_GREY"You don't have any Backpack");
    
format(stringex,sizeof(stringex),  <------ Line 7449
        
"Cash ($%s) \n\
        Pots (%sg) \n\
        Cracks (%sg) \n\
        Mats (%s)\n"
,
        
number_format(BackpackInfo[index][bCash]),
        
number_format(BackpackInfo[index][bPot]),
        
number_format(BackpackInfo[index][bCrack]),
        
number_format(BackpackInfo[index][bMats])
    ); 
If anyone could help me, i wouldn't be more thankful !
__________________

Last edited by SecretB; 22/09/2019 at 09:45 AM.
SecretB is offline   Reply With Quote
Old 22/09/2019, 09:25 AM   #2
AzaMx
Huge Clucker
 
Join Date: Aug 2014
Location: Home.
Posts: 336
Reputation: 63
Default Re: Multiple Errors

PHP Code:
stock ShowPlayerBackpack(playerid)
{
    new 
stringex[2000], index GetPlayerBackpackID(playerid),title[64];
    if(!
PlayerHasBackpack(playerid)) return SendClientMessageEx(playeridCOLOR_GREY"You don't have any Backpack");
    
format(stringex,sizeof(stringex), "Cash ($%s) \n\
    Pots (%sg) \n\
    Cracks (%sg) \n\
    Mats (%s)\n"
,
    
number_format(BackpackInfo[index][bCash]),
    
number_format(BackpackInfo[index][bPot]),
    
number_format(BackpackInfo[index][bCrack]),
    
number_format(BackpackInfo[index][bMats])); 
try this
AzaMx is offline   Reply With Quote
Old 22/09/2019, 09:42 AM   #3
SecretB
Little Clucker
 
Join Date: Jul 2015
Posts: 14
Reputation: 0
Default Re: Multiple Errors

Thanks for trying to help me, though i got this error back. Btw, i have rep'ed++ you for atleast trying helping me.


PHP Code:
C:\Users\Marc\Desktop\Active Gaming Roleplay (FL EDITION)\gamemodes\agrp.pwn(7452 -- 7453) : error 012invalid function callnot a valid address
C
:\Users\Marc\Desktop\Active Gaming Roleplay (FL EDITION)\gamemodes\agrp.pwn(7453) : warning 215expression has no effect
C
:\Users\Marc\Desktop\Active Gaming Roleplay (FL EDITION)\gamemodes\agrp.pwn(7453) : error 001expected token";"but found ")"
C:\Users\Marc\Desktop\Active Gaming Roleplay (FL EDITION)\gamemodes\agrp.pwn(7453) : error 029invalid expressionassumed zero
C
:\Users\Marc\Desktop\Active Gaming Roleplay (FL EDITION)\gamemodes\agrp.pwn(7453) : fatal error 107too many error messages on one line 
PHP Code:
stock ShowPlayerBackpack(playerid)
{
    new 
stringex[2000], index GetPlayerBackpackID(playerid),title[64];
    if(!
PlayerHasBackpack(playerid)) return SendClientMessageEx(playeridCOLOR_GREY"You don't have any Backpack");
    
format(stringex,sizeof(stringex), "Cash ($%s) \n\
    Pots (%sg) \n\
    Cracks (%sg) \n\
    Mats (%s)\n"
,
    
number_format(BackpackInfo[index][bCash]), <---- Line 7453
    number_format
(BackpackInfo[index][bPot]),
    
number_format(BackpackInfo[index][bCrack]),
    
number_format(BackpackInfo[index][bMats])); 
__________________
SecretB is offline   Reply With Quote
Old 22/09/2019, 11:50 AM   #4
Vizi10
Big Clucker
 
Join Date: May 2017
Location: Iran
Posts: 194
Reputation: 2
Exclamation Re: Multiple Errors

pawn Code:
stock ShowPlayerBackpack(playerid)
{
    new stringex[256], index = GetPlayerBackpackID(playerid), title[64];
    if(!PlayerHasBackpack(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You don't have any Backpack");
    format(stringex,sizeof(stringex), "Cash ($%sg)\nPots (%sg)\nCracks (%sg)\nMats (%s)", number_format(BackpackInfo[index][bCash]), number_format(BackpackInfo[index][bPot]), number_format(BackpackInfo[index][bCrack]), number_format(BackpackInfo[index][bMats]));
}
Vizi10 is offline   Reply With Quote
Old 22/09/2019, 12:02 PM   #5
SecretB
Little Clucker
 
Join Date: Jul 2015
Posts: 14
Reputation: 0
Default Re: Multiple Errors

PHP Code:
C:\Users\Marc\Desktop\Active Gaming Roleplay (FL EDITION)\gamemodes\agrp.pwn(7449) : error 012invalid function callnot a valid address
C
:\Users\Marc\Desktop\Active Gaming Roleplay (FL EDITION)\gamemodes\agrp.pwn(7449) : warning 215expression has no effect
C
:\Users\Marc\Desktop\Active Gaming Roleplay (FL EDITION)\gamemodes\agrp.pwn(7449) : error 001expected token";"but found ")"
C:\Users\Marc\Desktop\Active Gaming Roleplay (FL EDITION)\gamemodes\agrp.pwn(7449) : error 029invalid expressionassumed zero
C
:\Users\Marc\Desktop\Active Gaming Roleplay (FL EDITION)\gamemodes\agrp.pwn(7449) : fatal error 107too many error messages on one line 
PHP Code:
stock ShowPlayerBackpack(playerid)
{
    new 
stringex[256], index GetPlayerBackpackID(playerid), title[64];
    if(!
PlayerHasBackpack(playerid)) return SendClientMessageEx(playeridCOLOR_GREY"You don't have any Backpack");
    [
QUOTE](Line 7449)format[/QUOTE](stringex,sizeof(stringex), "Cash ($%sg)\nPots (%sg)\nCracks (%sg)\nMats (%s)"number_format(BackpackInfo[index][bCash]), number_format(BackpackInfo[index][bPot]), number_format(BackpackInfo[index][bCrack]), number_format(BackpackInfo[index][bMats]));

Will rep++ you tomorrow cause i reached the limit, Though thanks for trying to help me !
__________________
SecretB 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
Multiple Errors Joshman543 Scripting Help 5 19/02/2013 09:52 PM
Multiple errors. Cxnnor Scripting Help 0 14/08/2012 01:28 PM
Multiple errors BleverCastard Scripting Help 14 22/04/2012 09:41 PM
OnPlayerSelectedRow causes multiple errors TheNuttyScientist Help Archive 7 05/07/2010 08:15 PM
Need Help With Multiple Errors DaRkM Help Archive 2 26/07/2009 03:12 PM


All times are GMT. The time now is 08:58 PM.


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