SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Scripting Help (https://forum.sa-mp.com/forumdisplay.php?f=12)
-   -   argument type mismatch (argument 1) (https://forum.sa-mp.com/showthread.php?t=676164)

PowerF 31/05/2020 08:02 PM

argument type mismatch (argument 1)
 
PHP Code:

stock CreateRobberyCheckpointszName32 ], iRobValueFloatfXFloatfYFloatfZFloatrotationworldid )
{
    new 
FloatoffsetXFloatoffsetY;
    new 
rID Iter_FreeRobberyCount );

    if ( 
rID != ITER_NONE )
    {
// goes on 

PHP Code:

        formatg_businessDataiBusiness ] [ E_NAME ], 32"%s"szBusiness );
//later
        
new robberyid CreateRobberyCheckpointszBusiness0g_businessInteriorDataiType ] [ E_SAFE_X ], g_businessInteriorDataiType ] [ E_SAFE_Y ], g_businessInteriorDataiType ] [ E_SAFE_Z ], g_businessInteriorDataiType ] [ E_SAFE_ROTATION ], g_businessDataiBusiness ] [ E_WORLD ] ); 

What did I do wrong here?

Kwarde 31/05/2020 08:54 PM

Re: argument type mismatch (argument 1)
 
CreateRobberyCheckpoint uses "szName[ 32 ]".
CreateBusiness uses "const szName[ 32 ]", that's what is up ;)

You can safely remove the constant declaration in the CreateBusiness() function.

PowerF 31/05/2020 09:06 PM

Re: argument type mismatch (argument 1)
 
Quote:

Originally Posted by Kwarde (Post 4148942)
CreateRobberyCheckpoint uses "szName[ 32 ]".
CreateBusiness uses "const szName[ 32 ]", that's what is up ;)

You can safely remove the constant declaration in the CreateBusiness() function.

many thanks


All times are GMT. The time now is 10:15 PM.

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