C:\Users\user\Desktop\server\server\gamemodes\raven.pwn(7958) : error 035: argument type mismatch (argument 3) C:\Users\user\Desktop\server\server\gamemodes\raven.pwn(7959) : error 035: argument type mismatch (argument 1) C:\Users\user\Desktop\server\server\gamemodes\raven.pwn(7967) : error 017: undefined symbol "string2" C:\Users\user\Desktop\server\server\gamemodes\raven.pwn(7967) : error 017: undefined symbol "string2" C:\Users\user\Desktop\server\server\gamemodes\raven.pwn(7967) : error 029: invalid expression, assumed zero C:\Users\baran\Desktop\server\server\gamemodes\raven.pwn(7967) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.
CMD:boombox(playerid, params[]) { new string[128], bName[MAX_PLAYER_NAME]; GetPlayerName(playerid, bName, sizeof(bName)); if(PlayerInfo[playerid][pDonator] < 3) return SendClientMessage(playerid, COLOR_GREY, "Bu komutu yalnızca Elmas VIP olanlar kullanabilir."); if(!Boombox[playerid]) { if(sscanf(params, "s[256]", params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /boombox [Mьzik URL]"); for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(Boombox[i]) { if(IsPlayerInRangeOfPoint(playerid, 30, bpos[i][0], bpos[i][1], bpos[i][2])) { SendClientMessage(playerid, COLOR_GREY, "Burada zaten bir boombox kutusu var, lьtfen başka bir yere yerleştirin!"); return 1; } } } } new string2[128]; Boombox[playerid] = 1; ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0); format(string2, sizeof(string2), "%s mьzik kutusunu yere bıraktı.", bName); ProxDetector(15.0, playerid, string2, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GetPlayerPos(playerid, bpos[playerid][0], bpos[playerid][1], bpos[playerid][2]); bpos[playerid][2] = bpos[playerid][2] - 1; GetPlayerFacingAngle(playerid, bpos[playerid][3]); bpos[playerid][3] = bpos[playerid][3] +180; BoomboxObject[playerid] = CreateDynamicObject(2103, bpos[playerid][0], bpos[playerid][1], bpos[playerid][2], 0.0, 0.0, 0.0, .worldid = GetPlayerVirtualWorld(playerid), .interiorid = GetPlayerInterior(playerid)); format(BoomboxURL[playerid], 256, "%s", params); //SendNearbyMessage(playerid, 15, string2, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); format(string, sizeof(string), "Boombox Owner: %s\nUse /setboombox to set your boombox\n/pickupboombox to Pick up your boombox", bName); SetPVarInt(playerid, "bbIkon", _:CreateDynamic3DTextLabel(string, -1, bpos[0], bpos[1], bpos[2] +0.6, 5, .worldid = GetPlayerVirtualWorld(playerid), .interiorid = GetPlayerInterior(playerid))); SetPVarInt(playerid, "bbYer", CreateDynamicSphere(bpos[0], bpos[1], bpos[2], 30.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid))); SetPVarInt(playerid, "bbInt", GetPlayerInterior(playerid)); SetPVarInt(playerid, "bbVW", GetPlayerVirtualWorld(playerid)); } else { Boombox[playerid] = 0; ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0); format(string2, sizeof(string2), "%s mьzik kutusunu kaldırdı.", bName); ProxDetector(15.0, playerid, string2, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); DestroyDynamicObject(BoomboxObject[playerid]); format(BoomboxURL[playerid], 256, ""); for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(BoomboxPlayer[i] == playerid) { BoomboxStream[i] = 0; BoomboxPlayer[i] = -1; StopAudioStreamForPlayer(i); DestroyDynamicObject(GetPVarInt(playerid, "bbYer")); DestroyDynamic3DTextLabel(Text3D:GetPVarInt(playerid, "bbIkon")); SendClientMessage(i, COLOR_GREY, "Boombox sahibi mьziği kapatıp, boombox kutusunu aldı!"); } } } } return 1; }
string2 is defined inside a statement (if... new string2), but used in other statements
Make it global, near string and bName |
C:\Users\server\Desktop\server\server\gamemodes\raven.pwn(7957) : error 035: argument type mismatch (argument 3) C:\Users\server\Desktop\server\server\gamemodes\raven.pwn(7958) : error 035: argument type mismatch (argument 1) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
SetPVarInt(playerid, "bbIkon", _:CreateDynamic3DTextLabel(string, -1, bpos[0], bpos[1], bpos[2] +0.6, 5, .worldid = GetPlayerVirtualWorld(playerid), .interiorid = GetPlayerInterior(playerid))); SetPVarInt(playerid, "bbYer", CreateDynamicSphere(bpos[0], bpos[1], bpos[2], 30.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid)));
SetPVarInt(playerid, varname[], int_value)
I don't get what you mean't in this 2 lines, btw SetPVarInt usage is
PHP код:
|
CreateDynamic3DTextLabel(string, -1, bpos[0], bpos[1], bpos[2] +0.6, 5, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
CreateDynamicSphere(bpos[0], bpos[1], bpos[2], 30.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
I don't know what you want it to do, maybe only like that?
PHP код:
|
C:\Users\server\Desktop\server\server\gamemodes\raven.pwn(7957) : error 035: argument type mismatch (argument 3) C:\Users\server\Desktop\server\server\gamemodes\raven.pwn(7958) : error 035: argument type mismatch (argument 1)
CreateDynamic3DTextLabel(string, -1, bpos[playerid][0], bpos[playerid][1], bpos[playerid][2] +0.6, 5, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
CreateDynamicSphere(bpos[playerid][0], bpos[playerid][1], bpos[playerid][2], 30.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
How are you declaring bpos?
EDIT: [playerid] was missing PHP код:
|
SetPVarInt(playerid, "bbIkon", _:CreateDynamic3DTextLabel(string, -1, bpos[playerid][0], bpos[playerid][1], bpos[playerid][2] +0.6, 5, .worldid = GetPlayerVirtualWorld(playerid), .interiorid = GetPlayerInterior(playerid)));
SetPVarInt(playerid, "bbYer", CreateDynamicSphere(bpos[playerid][0], bpos[playerid][1], bpos[playerid][2], 30.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid)));