SA-MP Forums Archive
problems :S - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: problems :S (/showthread.php?tid=270029)



problems :S - Speed - 18.07.2011

I get this error:

pawn Код:
C:\DOCUME~1\User\Desktop\STUNTS~1\GAMEMO~1\stunt.pwn(1157) : warning 202: number of arguments does not match definition
C:\DOCUME~1\User\Desktop\STUNTS~1\GAMEMO~1\stunt.pwn(1158) : error 001: expected token: ")", but found "{"
C:\DOCUME~1\User\Desktop\STUNTS~1\GAMEMO~1\stunt.pwn(1162) : warning 202: number of arguments does not match definition
C:\DOCUME~1\User\Desktop\STUNTS~1\GAMEMO~1\stunt.pwn(1163) : error 001: expected token: ")", but found "{"
C:\DOCUME~1\User\Desktop\STUNTS~1\GAMEMO~1\stunt.pwn(1174) : warning 202: number of arguments does not match definition
C:\DOCUME~1\User\Desktop\STUNTS~1\GAMEMO~1\stunt.pwn(1175) : error 001: expected token: ")", but found "{"
C:\DOCUME~1\User\Desktop\STUNTS~1\GAMEMO~1\stunt.pwn(1176) : warning 202: number of arguments does not match definition
C:\DOCUME~1\User\Desktop\STUNTS~1\GAMEMO~1\stunt.pwn(1177) : error 001: expected token: ")", but found "{"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
and this is code:

pawn Код:
CMD:minigun(playerid, params[]) //1153 line
{ //1154 line
    new rand = random(sizeof(StrojnicaEvent)); //1155 line

    if(GetPVarInt(playerid, "Event", 1) //1157
    { //1158
       SendClientMessage(playerid, -1, ""#COL_GREY"Event is started!"); //1159
       return 1; //1160
    } //1161
    if(GetPVarInt(playerid, "Strojnica", 0) //1162
    { //1163
       SetPlayerPos(playerid, StrojnicaEvent[rand][0], StrojnicaEvent[rand][1], StrojnicaEvent[rand][2]); //1164
       ResetPlayerWeapons(playerid); //1165
       GivePlayerWeapon(playerid, 38, 5000); //1166
       SetPVarInt(playerid, "Strojnica", 1); //1167
       TogglePlayerControllable(playerid,0); //1168
       SendClientMessage(playerid, -1, ""#COL_GREY"Welcome to Event!"); //1169
       SendClientMessageToAll(-1, ""#COL_GREY"Event start in 60 seconds!"); //1170
       SetTimer("Event_S",60000,1); //1171
       return 1; //1172
    } //1173
    if(GetPVarInt(playerid, "Strojnica", 1) //1174
    { //1175
       if(GetPVarInt(playerid, "Event", 0) //1176
       { //1177
           SetPlayerPos(playerid, StrojnicaEvent[rand][0], StrojnicaEvent[rand][1], StrojnicaEvent[rand][2]); //1178
           ResetPlayerWeapons(playerid); //1179
           TogglePlayerControllable(playerid,0); //1180
           GivePlayerWeapon(playerid, 38, 5000); //1181
           SendClientMessage(playerid, -1, ""#COL_GREY"Welcome to event!"); //1182
           return 1; //1183
       } //1184
    } //1185
    return 1; //1186
} //1187
Plss help :S


Re: problems :S - lawonama - 18.07.2011

I think but im not sure:
Close the open "(" symbols.
Example you have:
pawn Код:
if(GetPVarInt(playerid, "Event", 1)
Make it like:
pawn Код:
if(GetPVarInt(playerid, "Event", 1))
Dont forgot to close the ( !!!


Re: problems :S - Adil - 18.07.2011

pawn Код:
CMD:minigun(playerid, params[]) //1153 line
{ //1154 line
    new rand = random(sizeof(StrojnicaEvent)); //1155 line

    if(GetPVarInt(playerid, "Event", 1)) //1157
    { //1158
       SendClientMessage(playerid, -1, ""#COL_GREY"Event is started!"); //1159
       return 1; //1160
    } //1161
    if(GetPVarInt(playerid, "Strojnica", 0)) //1162
    { //1163
       SetPlayerPos(playerid, StrojnicaEvent[rand][0], StrojnicaEvent[rand][1], StrojnicaEvent[rand][2]); //1164
       ResetPlayerWeapons(playerid); //1165
       GivePlayerWeapon(playerid, 38, 5000); //1166
       SetPVarInt(playerid, "Strojnica", 1); //1167
       TogglePlayerControllable(playerid,0); //1168
       SendClientMessage(playerid, -1, ""#COL_GREY"Welcome to Event!"); //1169
       SendClientMessageToAll(-1, ""#COL_GREY"Event start in 60 seconds!"); //1170
       SetTimer("Event_S",60000,1); //1171
       return 1; //1172
    } //1173
    if(GetPVarInt(playerid, "Strojnica", 1)) //1174
    { //1175
       if(GetPVarInt(playerid, "Event", 0)) //1176
       { //1177
           SetPlayerPos(playerid, StrojnicaEvent[rand][0], StrojnicaEvent[rand][1], StrojnicaEvent[rand][2]); //1178
           ResetPlayerWeapons(playerid); //1179
           TogglePlayerControllable(playerid,0); //1180
           GivePlayerWeapon(playerid, 38, 5000); //1181
           SendClientMessage(playerid, -1, ""#COL_GREY"Welcome to event!"); //1182
           return 1; //1183
       } //1184
    } //1185
    return 1; //1186
} //1187



Re: problems :S - DeadAhead - 18.07.2011

one thing...
Since when does GetPVarInt take 3 arguments?


Erm i would have replied in 120 seconds faster if this thing weren't here....


Re: problems :S - Speed - 18.07.2011

errors are solved but warings are still here :S


Re: problems :S - Speed - 19.07.2011

bump*


Re: problems :S - MoroDan - 19.07.2011

GetPVarInt got only 2 parameters, not more or less than 2. So, those:
PHP код:
if(GetPVarInt(playerid"Event"1//1157
if(GetPVarInt(playerid"Strojnica"0//1162
if(GetPVarInt(playerid"Strojnica"1//1174
if(GetPVarInt(playerid"Event"0//1176 
Must be:
PHP код:
if(GetPVarInt(playerid"Event") == 1//1157
if(!GetPVarInt(playerid"Strojnica")) //1162
if(GetPVarInt(playerid"Strojnica") == 1//1174
if(!GetPVarInt(playerid"Event")) //1176 



Re: problems :S - Speed - 19.07.2011

ty

i solved