SA-MP Forums Archive
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: Error. (/showthread.php?tid=625481)



Error. - AndreaSanchez - 02.01.2017

Hello guys. Please help. I use ZCMD.
PHP код:
CMD:giveveh(playeridparams[]) 
PHP код:
C:\Users\1\Desktop\Sanchez Server\gamemodes\gamemode.pwn(220) : error 029invalid expressionassumed zero
C
:\Users\1\Desktop\Sanchez Server\gamemodes\gamemode.pwn(220) : error 017undefined symbol "cmd_giveveh"
C:\Users\1\Desktop\Sanchez Server\gamemodes\gamemode.pwn(220) : error 029invalid expressionassumed zero
C
:\Users\1\Desktop\Sanchez Server\gamemodes\gamemode.pwn(220) : fatal error 107too many error messages on one line 



Re: Error. - iLearner - 02.01.2017

post full command.


Re: Error. - AndreaSanchez - 02.01.2017

PHP код:
CMD:giveveh(playeridparams[])
{
    new
        
targetid,
        
modelid,
        
color_1,
        
color_2;
    if(
sscanf(params"uiI(-1)I(-1)"targetidmodelidcolor_1color_2))
        return 
SendClientMessage(playerid, -1"???????????: /giveveh [targetid] [modelid] {color_1} {color_2}");
    if(
== IsPlayerConnected(targetid))
        return 
SendClientMessage(playerid, -1"?????? ?????? ??? ?? ???????.");
    if(!(
400 <= modelid <= 611))
        return 
SendClientMessage(playerid, -1"?????? ?????????? ?? ??????????.");
    new
        
Floatp_pos_x,
        
Floatp_pos_y,
        
Floatp_pos_z,
        
Floatp_pos_a;
    
GetPlayerPos(targetidp_pos_xp_pos_yp_pos_z);
    
GetPlayerFacingAngle(targetidp_pos_a);
    
PutPlayerInVehicle(targetidCreateVehicle(modelidp_pos_xp_pos_yp_pos_zp_pos_acolor_1color_2, -1), 0);
    static const
        
fmt_str[] = "?? ?????? ?????? %s (%i) ???????????? ????????. ID ??????: %i.";
    new
        
str[sizeof(fmt_str) + (-MAX_PLAYER_NAME) + (-3) + (-3)];
    
GetPlayerName(targetidstrMAX_PLAYER_NAME 1);
    
format(strsizeof(str), fmt_strstrtargetidmodelid);
    return 
SendClientMessage(playerid0xFF0000FFstr);




Re: Error. - oMa37 - 02.01.2017

Make sure the command is not in any function/callback.


Re: Error. - SyS - 02.01.2017

Is zcmd is included?
the command should be placed as global not as local to any callback or function.


Re: Error. - Codeah - 02.01.2017

Make sure that you have the following things
1. Make sure zcmd is included #include <zcmd>
2. Make sure that the command is not located in any public function.