Simple Help [+rep for helpers]
#1

I create FS but I get this problems

The Problems:

Код:
C:\Users\tal\Desktop\CubeGambling.pwn(23) : error 017: undefined symbol "PlayerInfo"
C:\Users\tal\Desktop\CubeGambling.pwn(23) : warning 215: expression has no effect
C:\Users\tal\Desktop\CubeGambling.pwn(23) : error 001: expected token: ";", but found "]"
C:\Users\tal\Desktop\CubeGambling.pwn(23) : error 029: invalid expression, assumed zero
C:\Users\tal\Desktop\CubeGambling.pwn(23) : fatal error 107: too many error messages on one line
The FS Codes:

Код:
//Cube Gambling System by HelpYou.

#include <a_samp>
#include <zcmd>


//Credits

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Cube Gambling system by HelpYou");
print("----------------------------------------\n");
return 1;
}

//CMD lines

CMD:CubeGambling(playerid, params[])
{
new string[128];
new CubeGambling = random(6)+1;
if(PlayerInfo[playerid][pCubeGambling])
{
if(PlayerInfo[playerid][pMask] == 1) { format(string, sizeof(string), "Stranger rolls a Cube Gambling that lands on %d.", CubeGambling); }
else { format(string, sizeof(string), "%s rolls a Cube Gambling that lands on %d.", GetPlayerNameEx(playerid),CubeGambling); }
ProxDetector(5.0, playerid, string, COLOR_NG);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "You don't have a Cube Gambling, Please buy from the 24/7 Store.");
return 1;
}
return 1;
}
+Rep for helpers
Reply
#2

you didn't define any PlayerInfo !
Reply
#3

When you see errors, don't just come running to the SA-MP forum - read them and work out what they mean, then work out how to fix it.

Start with the first error - undefined symbol "PlayerInfo". This is extremely obvious. You need to define 'PlayerInfo'. By define I don't just mean 'new PlayerInfo' or '#define PlayerInfo'. If you look at how it's used in the code, you can tell it's meant to be an enum structure and array.

Clearly you've copied some code from somewhere without knowing what it does, but haven't taken it all. Half your code makes no sense at all, as it's just copied and pasted from another script with no context.
Reply
#4

Can you help me with this?
Reply
#5

Is it too hard to define the PlayerInfo?
Reply
#6

Код:
//Cube Gambling System by HelpYou.

#include <a_samp>
#include <zcmd>

enum PlayerStats
{
    pCubeGambling,
    pMask
}
PlayerInfo[MAX_PLAYERS][PlayerStats];

//Credits

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Cube Gambling system by HelpYou");
print("----------------------------------------\n");
return 1;
}

//CMD lines

CMD:CubeGambling(playerid, params[])
{
   new string[128];
   new CubeGambling = random(6)+1;
   if(PlayerInfo[playerid][pCubeGambling])
   {
      if(PlayerInfo[playerid][pMask] == 1) 
      { 
          format(string, sizeof(string), "Stranger rolls a Cube Gambling that lands on %d.", CubeGambling); 
      }
      else 
      { 
          format(string, sizeof(string), "%s rolls a Cube Gambling that lands on %d.",            GetPlayerNameEx(playerid),CubeGambling); 
      }
      ProxDetector(5.0, playerid, string, COLOR_NG);
   }
   else SendClientMessage(playerid, COLOR_GRAD2, "You don't have a Cube Gambling, Please buy from the 24/7 Store.");
   return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)