Jump to content
  • 0

pomoc Problém: GAMEMODE


Yelen

Dotaz

Popis problému:


Zdravím, problém my vyskakuje a nevím proč, vše by mělo být tak jak má být a dokonce kamarád pawner ani neví co s tím.


Chyby/varování kompilátoru a při běhu:


G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : error 029: invalid expression, assumed zero
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : error 001: expected token: ";", but found ")"
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : error 029: invalid expression, assumed zero
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : fatal error 107: too many error messages on one line


Kód:

 

--

 




Dodatečné poznámky:

Jedná se o tento řádek
ShowPlayerDialog(playerid, DIALOG_MANAGE_BUSINESS, DIALOG_STYLE_TABLIST, "Business Management", string, "Choose", "Cancel");


Celé:

Player_ShowBusinessMenu(playerid)
{
new id = InBusiness[playerid], is_owned = Player_OwnsBusiness(playerid, id), string[256];
format(string, sizeof(string), "{%s}Business Name\t%s\n{%s}Status\t%s\n{%s}Permissions\n{%s}Business Safe\n{%s}Sell Business",
(is_owned) ? ("FFFFFF") : ("E74C3C"), BusinessData[id][Name], // Business Name
(is_owned) ? ("FFFFFF") : ("E74C3C"), BusinessStates[ BusinessData[id][Closed] ], // Business State
(is_owned) ? ("FFFFFF") : ("E74C3C"), // Permissions
(Player_CheckPermission(playerid, id, PERM_CAN_USE_SAFE)) ? ("FFFFFF") : ("E74C3C"), // Business Safe
(is_owned) ? ("FFFFFF") : ("E74C3C")); // Sell Business
ShowPlayerDialog(playerid, DIALOG_MANAGE_BUSINESS, DIALOG_STYLE_TABLIST, "Business Management", string, "Choose", "Cancel");
return 1;
}
Edited by Yelen
Link to comment
Share on other sites

17 odpovědí na tuto otázku

Recommended Posts

  • 0
  • Globální moderátor

Taak prosímtě, nejdříve smaž celý ten format a zkus, pokud to nepůjde, tak ShowPlayerDialog zaměň za 

ShowPlayerDialog(playerid,DIALOG_MANAGE_BUSINESS,DIALOG_STYLE_TABLIST,"Business Management",string,"Choose","Cancel");

a zkus. Dej vědět jak to dopadlo.

Link to comment
Share on other sites

  • 0
  • Globální moderátor

Ja tam chybu nevidim. Schvalne jsem tu fci zkopcil do .pwn, ale nehazelo mi to zadne errory. Jsi si jisty, ze error ukazuje na tenhle radek?

Link to comment
Share on other sites

  • 0
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : error 029: invalid expression, assumed zero
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : error 001: expected token: ";", but found ")"
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : error 029: invalid expression, assumed zero
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : fatal error 107: too many error messages on one line

takhle to dopadlo :d

Ja tam chybu nevidim. Schvalne jsem tu fci zkopcil do .pwn, ale nehazelo mi to zadne errory. Jsi si jisty, ze error ukazuje na tenhle radek?

Beru to podle té chyby co mi pawno vyhazuje. je tam 3206 tak asi 3206

Link to comment
Share on other sites

  • 0
  • Globální moderátor

Po čem to takhle dopadlo? Řádek je totiž stále stejný a kdyby jsi smazal ten format, tak by se snížil o 1

 

(defacto na co naráží HP)

Edited by Hip
Link to comment
Share on other sites

  • 0
  • Globální moderátor

Zkus jeste vsechny ty ternarni operatory obalit zavorkou

 

(is_owned) ? ("FFFFFF") : ("E74C3C") ====> ((is_owned) ? ("FFFFFF") : ("E74C3C"))

Link to comment
Share on other sites

  • 0

Zkus jeste vsechny ty ternarni operatory obalit zavorkou

 

(is_owned) ? ("FFFFFF") : ("E74C3C") ====> ((is_owned) ? ("FFFFFF") : ("E74C3C"))

nepomohlo hodilo to ještě víc errorů:

G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3200 -- 3201) : error 001: expected token: ")", but found ":"
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3202) : error 029: invalid expression, assumed zero
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3203) : error 029: invalid expression, assumed zero
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3205) : error 029: invalid expression, assumed zero
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3205) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : error 029: invalid expression, assumed zero
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : error 001: expected token: ";", but found ")"
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : error 029: invalid expression, assumed zero
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3206) : fatal error 107: too many error messages on one line
Link to comment
Share on other sites

  • 0
  • Globální moderátor

jako dobrý nápada Printíku, ale nebudeme přeci zatěžovat zbytečně procák...

if(is_owned) format(string, sizeof(string), "{%s}Business Name\t%s\n{%s}Status\t%s\n{%s}Permissions\n{%s}Business Safe\n{%s}Sell Business",
"FFFFFF", BusinessData[id][Name], // Business Name
"FFFFFF", BusinessStates[BusinessData[id][Closed]], // Business State
"FFFFFF", // Permissions
(Player_CheckPermission(playerid, id, PERM_CAN_USE_SAFE)) ? ("FFFFFF") : ("E74C3C"), // Business Safe
"FFFFFF"); // Sell Business
else format(string, sizeof(string), "{%s}Business Name\t%s\n{%s}Status\t%s\n{%s}Permissions\n{%s}Business Safe\n{%s}Sell Business",
"E74C3C", BusinessData[id][Name], // Business Name
"E74C3C", BusinessStates[BusinessData[id][Closed]], // Business State
"E74C3C", // Permissions
(Player_CheckPermission(playerid, id, PERM_CAN_USE_SAFE)) ? ("FFFFFF") : ("E74C3C"), // Business Safe
"E74C3C"); // Sell Business

takže prosímtě zaměň ještě za toto, aby jsi to zoptimalizoval icon_e_smile.gif

Edited by Hip
Link to comment
Share on other sites

  • 0

jako dobrý nápada Printíku, ale nebudeme přeci zatěžovat zybtečně procák...

if(is_owned) format(string, sizeof(string), "{%s}Business Name\t%s\n{%s}Status\t%s\n{%s}Permissions\n{%s}Business Safe\n{%s}Sell Business",
"FFFFFF", BusinessData[id][Name], // Business Name
"FFFFFF", BusinessStates[BusinessData[id][Closed]], // Business State
"FFFFFF", // Permissions
(Player_CheckPermission(playerid, id, PERM_CAN_USE_SAFE)) ? ("FFFFFF") : ("E74C3C"), // Business Safe
"FFFFFF"); // Sell Business
else format(string, sizeof(string), "{%s}Business Name\t%s\n{%s}Status\t%s\n{%s}Permissions\n{%s}Business Safe\n{%s}Sell Business",
"E74C3C", BusinessData[id][Name], // Business Name
"E74C3C", BusinessStates[BusinessData[id][Closed]], // Business State
"E74C3C", // Permissions
(Player_CheckPermission(playerid, id, PERM_CAN_USE_SAFE)) ? ("FFFFFF") : ("E74C3C"), // Business Safe
"E74C3C"); // Sell Business

takže prosímtě zaměň ještě za toto, aby jsi to zoptimalizoval icon_e_smile.gif

G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3199) : error 017: undefined symbol "is_owned"
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3199) : error 017: undefined symbol "string"
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3199) : error 017: undefined symbol "string"
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3199) : fatal error 107: too many error messages on one line
Link to comment
Share on other sites

  • 0
  • Globální moderátor

 

G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3199) : error 017: undefined symbol "is_owned"
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3199) : error 017: undefined symbol "string"
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3199) : error 017: undefined symbol "string"
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3199) : fatal error 107: too many error messages on one line

 

 

nope, smaž jenom původní format, zbytek nechej (deklarace proměných a showdialog..)

Edited by Hip
Link to comment
Share on other sites

  • 0

Když jsem samotně to hodil do pawna tak mi to taky nevyhodilo chybu, takže nevíte nějakej nápad jak do toho gamemodu přidat, aby ten gamemode byl napojen na ten filterscript ?

Link to comment
Share on other sites

  • 0
stock Player_ShowBusinessMenu(playerid)
{
new id = InBusiness[playerid], is_owned = Player_OwnsBusiness(playerid, id), string[256];
if(is_owned) format(string, sizeof(string), "{%s}Business Name\t%s\n{%s}Status\t%s\n{%s}Permissions\n{%s}Business Safe\n{%s}Sell Business",
"FFFFFF", BusinessData[id][Name], // Business Name
"FFFFFF", BusinessStates[BusinessData[id][Closed]], // Business State
"FFFFFF", // Permissions
(Player_CheckPermission(playerid, id, PERM_CAN_USE_SAFE)) ? ("FFFFFF") : ("E74C3C"), // Business Safe
"FFFFFF"); // Sell Business
else format(string, sizeof(string), "{%s}Business Name\t%s\n{%s}Status\t%s\n{%s}Permissions\n{%s}Business Safe\n{%s}Sell Business",
"E74C3C", BusinessData[id][Name], // Business Name
"E74C3C", BusinessStates[BusinessData[id][Closed]], // Business State
"E74C3C", // Permissions
(Player_CheckPermission(playerid, id, PERM_CAN_USE_SAFE)) ? ("FFFFFF") : ("E74C3C"), // Business Safe
"E74C3C"); // Sell Business
ShowPlayerDialog(playerid, DIALOG_MANAGE_BUSINESS, DIALOG_STYLE_TABLIST, "Business Management", string, "Choose", "Cancel");
return 1;
}

skus to takto aj 

Link to comment
Share on other sites

  • 0
stock Player_ShowBusinessMenu(playerid)
{
new id = InBusiness[playerid], is_owned = Player_OwnsBusiness(playerid, id), string[256];
if(is_owned) format(string, sizeof(string), "{%s}Business Name\t%s\n{%s}Status\t%s\n{%s}Permissions\n{%s}Business Safe\n{%s}Sell Business",
"FFFFFF", BusinessData[id][Name], // Business Name
"FFFFFF", BusinessStates[BusinessData[id][Closed]], // Business State
"FFFFFF", // Permissions
(Player_CheckPermission(playerid, id, PERM_CAN_USE_SAFE)) ? ("FFFFFF") : ("E74C3C"), // Business Safe
"FFFFFF"); // Sell Business
else format(string, sizeof(string), "{%s}Business Name\t%s\n{%s}Status\t%s\n{%s}Permissions\n{%s}Business Safe\n{%s}Sell Business",
"E74C3C", BusinessData[id][Name], // Business Name
"E74C3C", BusinessStates[BusinessData[id][Closed]], // Business State
"E74C3C", // Permissions
(Player_CheckPermission(playerid, id, PERM_CAN_USE_SAFE)) ? ("FFFFFF") : ("E74C3C"), // Business Safe
"E74C3C"); // Sell Business
ShowPlayerDialog(playerid, DIALOG_MANAGE_BUSINESS, DIALOG_STYLE_TABLIST, "Business Management", string, "Choose", "Cancel");
return 1;
}

skus to takto aj 

 

G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3212) : error 029: invalid expression, assumed zero
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3212) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3212) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3212) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3212) : warning 215: expression has no effect
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3212) : error 001: expected token: ";", but found ")"
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3212) : error 029: invalid expression, assumed zero
G:\LV-RP DEVELOPMENT\gamemodes\rp.pwn(3212) : fatal error 107: too many error messages on one line

 

furt problém v tom posledním

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...