Help needed
#1

Oks so all should be ok but now i get errors on compile ;/

Code:
PHP код:
3469 dcmd_stats(playerid,params[])
3470 {
3471    #pragma unused params
3472    new statz[1024];
3473    format(statzsizeof (statz),
3474    "Score: %d\nBank: %d\nMoney: $%d\nAdmin: %d\nArmy: %d\nSWAT: %d\nRegular: %d\nTerrorLVL: 3475%d\nRobbberLVL: %d\nC4: %d\nRope: %d",
3476    GetPlayerScore[playerid], BankCash[playerid], GetPlayerMoney[playerid], AdminLevel[playerid], 3477CanUseArmy[playerid], CanUseSWAT[playerid],
3478    IsRegularPlayer[playerid], TerroristSkill[playerid], RobSkill[playerid], HasC4[playerid], HasRope[playerid]);
3479    ShowPlayerDialog(playerid,644,DIALOG_STYLE_MSGBOX,"Stats",statz,"Close","");
3480    return 1;
3481 
Errors:
PHP код:
:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(3473 -- 3475) : error 028invalid subscript (not an array or too many subscripts): "GetPlayerScore"
C:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(3475) : warning 215expression has no effect
C
:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(3475) : error 001expected token";"but found "]"
C:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(3475) : error 029invalid expressionassumed zero
C
:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(3475) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Reply
#2

Hello, Try this

PHP код:
dcmd_stats(playerid,params[])
{
    
#pragma unused params
    
new statz[1024],coordsstring[512];
    
format(statzsizeof(statz),"Score: %d\nBank: %d\nMoney: $%d\nAdmin: %d\nArmy: %d\nSWAT: %d\n",GetPlayerScore[playerid], BankCash[playerid], GetPlayerMoney[playerid], AdminLevel[playerid], CanUseArmy[playerid], CanUseSWAT[playerid]);
     
format(coordsstringsizeof(coordsstring), "» Regular: %d\nTerrorLVL: %d\nRobbberLVL: %d\nC4: %d\nRope: %d"IsRegularPlayer[playerid], TerroristSkill[playerid], RobSkill[playerid], HasC4[playerid], HasRope[playerid]);
     
strcat(statz,coordsstring);
    
ShowPlayerDialog(playerid,644,DIALOG_STYLE_MSGBOX,"Stats",statz,"Close","");
    return 
1;

Reply
#3

Quote:
Originally Posted by yusei
Посмотреть сообщение
Hello, Try this

PHP код:
dcmd_stats(playerid,params[])
{
    
#pragma unused params
    
new statz[1024],coordsstring[512];
    
format(statzsizeof(statz),"Score: %d\nBank: %d\nMoney: $%d\nAdmin: %d\nArmy: %d\nSWAT: %d\n",GetPlayerScore[playerid], BankCash[playerid], GetPlayerMoney[playerid], AdminLevel[playerid], CanUseArmy[playerid], CanUseSWAT[playerid]);
     
format(coordsstringsizeof(coordsstring), "» Regular: %d\nTerrorLVL: %d\nRobbberLVL: %d\nC4: %d\nRope: %d"IsRegularPlayer[playerid], TerroristSkill[playerid], RobSkill[playerid], HasC4[playerid], HasRope[playerid]);
     
strcat(statz,coordsstring);
    
ShowPlayerDialog(playerid,644,DIALOG_STYLE_MSGBOX,"Stats",statz,"Close","");
    return 
1;

Im getting these ;/
PHP код:
C:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(3473) : error 028invalid subscript (not an array or too many subscripts): "GetPlayerScore"
C:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(3473) : warning 215expression has no effect
C
:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(3473) : error 001expected token";"but found "]"
C:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(3473) : error 029invalid expressionassumed zero
C
:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(3473) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Reply
#4

pawn Код:
GetPlayerScore[playerid], ..., GetPlayerMoney[playerid]
Those are functions by SA-MP, you cannot use them as arrays.

pawn Код:
GetPlayerScore(playerid), ..., GetPlayerMoney(playerid)
Reply
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
pawn Код:
GetPlayerScore[playerid], ..., GetPlayerMoney[playerid]
Those are functions by SA-MP, you cannot use them as arrays.

pawn Код:
GetPlayerScore(playerid), ..., GetPlayerMoney(playerid)
Changed all [playerid] to (playerid)

And Now i get these:
PHP код:
C:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(3473) : error 012invalid function callnot a valid address
C
:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(3473) : warning 215expression has no effect
C
:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(3473) : error 001expected token";"but found ")"
C:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(3473) : error 029invalid expressionassumed zero
C
:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(3473) : fatal error 107too many error messages on one line 
Reply
#6

try to change juste the samp function

PHP код:
dcmd_stats(playerid,params[])
{
    
#pragma unused params
    
new statz[1024],coordsstring[512];
    
format(statzsizeof(statz),"Score: %d\nBank: %d\nMoney: $%d\nAdmin: %d\nArmy: %d\nSWAT: %d\n",GetPlayerScore(playerid), BankCash[playerid], GetPlayerMoney(playerid), AdminLevel[playerid], CanUseArmy[playerid], CanUseSWAT[playerid]);
     
format(coordsstringsizeof(coordsstring), "» Regular: %d\nTerrorLVL: %d\nRobbberLVL: %d\nC4: %d\nRope: %d"IsRegularPlayer[playerid], TerroristSkill[playerid], RobSkill[playerid], HasC4[playerid], HasRope[playerid]);
     
strcat(statz,coordsstring);
    
ShowPlayerDialog(playerid,644,DIALOG_STYLE_MSGBOX,"Stats",statz,"Close","");
    return 
1;

Reply
#7

Quote:
Originally Posted by yusei
Посмотреть сообщение
try to change juste the samp function

PHP код:
dcmd_stats(playerid,params[])
{
    
#pragma unused params
    
new statz[1024],coordsstring[512];
    
format(statzsizeof(statz),"Score: %d\nBank: %d\nMoney: $%d\nAdmin: %d\nArmy: %d\nSWAT: %d\n",GetPlayerScore(playerid), BankCash[playerid], GetPlayerMoney(playerid), AdminLevel[playerid], CanUseArmy[playerid], CanUseSWAT[playerid]);
     
format(coordsstringsizeof(coordsstring), "» Regular: %d\nTerrorLVL: %d\nRobbberLVL: %d\nC4: %d\nRope: %d"IsRegularPlayer[playerid], TerroristSkill[playerid], RobSkill[playerid], HasC4[playerid], HasRope[playerid]);
     
strcat(statz,coordsstring);
    
ShowPlayerDialog(playerid,644,DIALOG_STYLE_MSGBOX,"Stats",statz,"Close","");
    return 
1;

Still these ;/

PHP код:
C:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(12951) : error 029invalid expressionassumed zero
C
:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(12951) : warning 215expression has no effect
C
:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(12951) : error 001expected token";"but found "]"
C:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(12951) : error 029invalid expressionassumed zero
C
:\Users\WeeD\Desktop\Okay\Mans CNR serveris\gamemodes\NLCNR.pwn(12951) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Edit THANKS it worked :* New erros were on another lane got that fixed
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)