if(response)
#1

Hey!

What's the problem?
I get this errors when i try to add if(response):
Code:
D:\Siuntiniai\GRP4(1)\GRP4\pawno\include\j_fader.inc(38) : warning 219: local variable "interior" shadows a variable at a preceding level
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5675) : error 029: invalid expression, assumed zero
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5675) : error 004: function "OPVD_OnPlayerUpdate" is not implemented
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5708) : warning 225: unreachable code
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5708) : error 029: invalid expression, assumed zero
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5708) : error 004: function "OnFadeComplete" is not implemented
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5719) : warning 225: unreachable code
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5719) : error 029: invalid expression, assumed zero
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5719) : error 004: function "OnPlayerVehicleDamage" is not implemented
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5721) : error 017: undefined symbol "Damage"
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5724) : error 017: undefined symbol "vehicleid"
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5727) : error 017: undefined symbol "vehicleid"
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5732) : error 029: invalid expression, assumed zero
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5732) : error 017: undefined symbol "kamera"
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5733) : error 029: invalid expression, assumed zero
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5733) : error 017: undefined symbol "kamera"
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5742) : warning 225: unreachable code
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5742) : error 029: invalid expression, assumed zero
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5742) : error 017: undefined symbol "bloga"
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5743) : error 029: invalid expression, assumed zero
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5743) : error 017: undefined symbol "bloga"
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5749) : warning 225: unreachable code
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5749) : error 029: invalid expression, assumed zero
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5749) : error 017: undefined symbol "linijos"
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5750) : error 029: invalid expression, assumed zero
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5750) : error 017: undefined symbol "linijos"
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5756) : warning 225: unreachable code
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5756) : error 029: invalid expression, assumed zero
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5756) : error 017: undefined symbol "kamera2"
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5757) : error 029: invalid expression, assumed zero
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5757) : error 017: undefined symbol "kamera2"
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5766) : warning 225: unreachable code
D:\Siuntiniai\GRP4(1)\GRP4\gamemodes\new.pwn(5766) : error 029: invalid expression, assumed zero
Code:
Code:
new rand = random(sizeof(bmx1));
if(dialogid == 9)
{
if(response)
{
playerDB[playerid][bmxp]=true;
bmxo[playerid] = SetPlayerCheckpoint(playerid,bmx1[rand][0],bmx1[rand][1],bmx1[rand][2],3);
return 0;
}
if(dialogid == 10)
{
if(response)
{
DisablePlayerCheckpoint(playerid);
playerDB[playerid][bmxp]=false;
SendClientMessage(playerid, YELLOW, "Wow!...");
return 1;
}
Reply
#2

pawn Code:
new rand = random(sizeof(bmx1));
if(dialogid == 9)
{
if(response)
{
playerDB[playerid][bmxp]=true;
bmxo[playerid] = SetPlayerCheckpoint(playerid,bmx1[rand][0],bmx1[rand][1],bmx1[rand][2],3);
}
return 0;
}

if(dialogid == 10)
{
if(response)
{
DisablePlayerCheckpoint(playerid);
playerDB[playerid][bmxp]=false;
SendClientMessage(playerid, YELLOW, "Wow!...");
}
return 1;
}
Missing brackets :P
Reply
#3

Thnx man! +REP!
Reply
#4

By the way, learn to use some tabs like this:
pawn Code:
new rand = random(sizeof(bmx1));
if(dialogid == 9)
{
    if(response)
    {
        playerDB[playerid][bmxp]=true;
        bmxo[playerid] = SetPlayerCheckpoint(playerid,bmx1[rand][0],bmx1[rand][1],bmx1[rand][2],3);
    }
    return 0;
}

if(dialogid == 10)
{
    if(response)
    {
        DisablePlayerCheckpoint(playerid);
        playerDB[playerid][bmxp]=false;
        SendClientMessage(playerid, YELLOW, "Wow!...");
    }
    return 1;
}

// Credits are going to Naruto_Emilio for the fix
Reply
#5

Quote:
Originally Posted by lukas567
View Post
Code:
Code:
new rand = random(sizeof(bmx1));
if(dialogid == 9)
{
if(response)
{
playerDB[playerid][bmxp]=true;
bmxo[playerid] = SetPlayerCheckpoint(playerid,bmx1[rand][0],bmx1[rand][1],bmx1[rand][2],3);
return 0;
}
if(dialogid == 10)
{
if(response)
{
DisablePlayerCheckpoint(playerid);
playerDB[playerid][bmxp]=false;
SendClientMessage(playerid, YELLOW, "Wow!...");
return 1;
}
If you don't use a good indentation, you will never understand your code ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)