Problème avec mon hud X_X

  • Initiateur de la discussion
DinamoPerixx

DinamoPerixx

Geek suprême
Messages
100
Score réaction
6
Points
115
bonjour,
Quand je lance gmod avec cet hud, il me dis qu'il y a un problème avec une ligne qui est la ligne 78, mais j'ai vérifier sur d'autre forum et ils m ont dis que le code est bon.

Code:
----------------------------------------------------------------
-- HUD RedWood
-----------------------------------------------------------------
-----------------------------------------------------------------
-- HUD COFIG
-----------------------------------------------------------------
-----------------------------------------------------------------
-- SUPP HUD
-----------------------------------------------------------------
local hideHUDElements = {
["DarkRP_HUD"] = true,
["DarkRP_HUD"] = true,
}
hook.Add("HUDShouldDraw", "flatHUD_HideDefaultDarkRPHud", function(name)
if hideHUDElements[name] then return false end
end)
-----------------------------------------------------------------
-- HUD POLICE
-----------------------------------------------------------------
surface.CreateFont("police",{
font = "Arial",
size = 18,
weight = 400,
antialias = true
})
-----------------------------------------------------------------
-- HUD PAINT
-----------------------------------------------------------------
hook.Add( "HUDPaint", "HUDPaint_DrawABox", function()
-- base de l'hud
draw.RoundedBox( 0, 10, 1000, 330, 70, Color( 61, 61, 61, 255 ) )
draw.RoundedBox( 0, 10, 930, 230, 70, Color( 61, 61, 61, 255 ) )
draw.RoundedBox( 0, 240, 930, 100, 70, Color( 61, 61, 61, 225 ) )
draw.RoundedBox( 0, 10, 910, 100, 20, Color( 61, 61, 61, 255 ) )
draw.RoundedBox( 0, 10, 1000, 330, 2, Color( 0, 0, 0, 255 ) )
draw.RoundedBox( 0, 240, 930, 2, 70, Color( 0, 0, 0, 255 ) )
-- Nom du serveur
draw.DrawText( "RedWood", "police", 23, 910, Color( 40, 40, 40, 255 ), 0, 0)
-- effet (vie, armure & faim)
draw.RoundedBox( 5, 60, 960, 175, 15, Color( 0, 0, 0, 200 ) )
draw.RoundedBox( 5, 60, 980, 175, 15, Color( 0, 0, 0, 200 ) )
draw.RoundedBox( 5, 60, 940, 175, 15, Color( 0, 0, 0, 200 ) )
-- gestion de vie
local health = (LocalPlayer():Health() or 0)
if health > 100 then health = 100 end
if health < 0 then health = 0 end
draw.RoundedBox( 0, 60, 960, health * 1.7, 10, Color( 255, 0, 0, 255 ))
draw.SimpleText( health.."%", "police", 15, 955, Color( 255, 255, 255, 255 ))
-- gestion d'armure
local armor = (LocalPlayer():Armor() or 0)
if armor > 100 then armor = 100 end
if armor < 0 then armor = 0 end
draw.RoundedBox( 0, 60, 980, armor * 1.7, 10, Color( 0, 0, 255, 255 ))
draw.SimpleText( armor.."%", "police", 15, 975, Color( 255, 255, 255, 255 ))
-- gestion de faim
local hunger = math.ceil(LocalPlayer():getDarkRPVar("Energy") or 0)
if hunger > 100 then hunger = 100 end
if hunger < 0 then hunger = 0 end
draw.RoundedBox( 0, 60, 940, hunger * 1.7, 10, Color( 0, 255, 0, 255 ))
draw.SimpleText( hunger.."%", "police", 15, 935, Color( 255, 255, 255, 255 ))
-- salaire
local salaire = LocalPlayer():getDarkRPVar("salary")
draw.SimpleText( salaire.."$", "police", 260, 1040, Color( 255, 255, 255, 255 ))
-- job
local job = team.GetName(LocalPlayer():Team())
draw.SimpleText( job.."", "police", 25, 1040, Color( 255, 255, 255, 255 ))
-- nom
local name = LocalPlayer():Name()
draw.SimpleText( name, "police", 25, 1010, Color( 255, 255, 255, 255 ))
-- money
local money = LocalPlayer():getDarkRPVar("money")
draw.SimpleText( money.."$", "police", 260, 1010, Color( 255, 255, 255, 255 ))
-- license
local Page = Material("icon16/page_white_text.png")
local NoPage = Material("icon16/page_white_delete.png")
if LocalPlayer().DarkRPVars.HasGunlicense then
surface.SetMaterial(Page)
surface.SetDrawColor(255, 255, 255, 255)
surface.DrawTexturedRect(320, 1012, 13, 13)
else
surface.SetMaterial(NoPage)
surface.SetDrawColor(255, 255, 255, 255)
surface.DrawTexturedRect(320, 1012, 13, 13)
end
-----------------------------------------------------------------
-- HUD AGENDA
-----------------------------------------------------------------
local agenda = LocalPlayer():getAgendaTable()
if not agenda then return end
agendaText = agendaText or DarkRP.textWrap((LocalPlayer():getDarkRPVar("agenda") or ""):gsub("//", "\n"):gsub("\\n", "\n"), "DarkRPHUD1", 440)
draw.RoundedBox( 10, 10, 10, 460, 110, Color(61, 61, 61, 155) )
draw.RoundedBox( 10, 12, 12, 456, 106, Color(61, 61, 61,100) )
draw.RoundedBox( 10, 12, 12, 456, 20, Color(255, 255, 255, 255) )
draw.DrawNonParsedText( agenda.Title, "police", 30, 12, Color(0, 0, 0, 255), 0 )
draw.DrawNonParsedText( agendaText, "DarkRPHUD1", 30, 35, Color(0, 0, 0, 255), 0 )
if ply != LocalPlayer() then return end
if var == "agenda" and new then
agendaText = DarkRP.textWrap(new:gsub("//", "\n"):gsub("\\n", "\n"), "DarkRPHUD1", 440)
else
agendaText = nil
end
end )
-----------------------------------------------------------------
-- HUD AMMO
-----------------------------------------------------------------
-----------------------------------------------------------------
-- HUD PLAYER MODEL
-----------------------------------------------------------------
if(CLIENT)then
local function PlayerModel()
local ply=LocalPlayer()
PlayerModel = vgui.Create("DModelPanel")
function PlayerModel:LayoutEntity( Entity ) return end
PlayerModel:SetModel( LocalPlayer():GetModel() )
PlayerModel:SetPos(250,800)
PlayerModel:SetSize(75, 200)
PlayerModel:SetCamPos(Vector( 28, 0, 65))
PlayerModel:SetLookAt(Vector( - 20, 0, 105))
timer.Create( "UpdatePlayerModel", 0.5, 0, function()
if LocalPlayer():GetModel() != PlayerModel.Entity:GetModel() then
PlayerModel:Remove()
PlayerModel = vgui.Create("DModelPanel")
function PlayerModel:LayoutEntity( Entity ) return end
PlayerModel:SetModel( LocalPlayer():GetModel())
PlayerModel:SetPos(250,800)
PlayerModel:SetSize(75, 200)
PlayerModel:SetCamPos(Vector( 28, 0, 65))
PlayerModel:SetLookAt(Vector( - 20, 0, 105))
end
end)
end
hook.Add("InitPostEntity", "PlayerModel", PlayerModel)
end
 
  • Initiateur de la discussion
DinamoPerixx

DinamoPerixx

Geek suprême
Messages
100
Score réaction
6
Points
115
La ligne dont il me dit qu'il y a une erreur c'est:

Code:
-- salaire
local salaire = LocalPlayer():getDarkRPVar("salary")
draw.SimpleText( salaire.."$", "police", 260, 1040, Color( 255, 255, 255, 255 ))
 
ɓïℓℓγ

ɓïℓℓγ

Psychopathe
Messages
1 105
Score réaction
291
Points
230
DinamoPerixx à dit:
La ligne dont il me dit qu'il y a une erreur c'est:

Code:
-- salaire
local salaire = LocalPlayer():getDarkRPVar("salary")
draw.SimpleText( salaire.."$", "police", 260, 1040, Color( 255, 255, 255, 255 ))
C'est quoi l'erreur ?
 
  • Initiateur de la discussion
DinamoPerixx

DinamoPerixx

Geek suprême
Messages
100
Score réaction
6
Points
115
ɓïℓℓγ à dit:
C'est quoi l'erreur ?
justement je la cherche ^^ et j'en peux plus donc je viens demander içi ^^
 
ɓïℓℓγ

ɓïℓℓγ

Psychopathe
Messages
1 105
Score réaction
291
Points
230
DinamoPerixx à dit:
justement je la cherche ^^ et j'en peux plus donc je viens demander içi ^^
L'erreur de la console , je disais .
 
  • Initiateur de la discussion
DinamoPerixx

DinamoPerixx

Geek suprême
Messages
100
Score réaction
6
Points
115
  • Initiateur de la discussion
DinamoPerixx

DinamoPerixx

Geek suprême
Messages
100
Score réaction
6
Points
115
ɓïℓℓγ à dit:
L'erreur de la console , je disais .
[ERROR] addons/darkrpmodification-master/lua/darkrp_modules/hudrdw/cl_hud.lua:91: attempt to concatenate local 'salaire' (a nil value)
1. v - addons/darkrpmodification-master/lua/darkrp_modules/hudrdw/cl_hud.lua:91
2. unknown - lua/includes/modules/hook.lua:84
 
ɓïℓℓγ

ɓïℓℓγ

Psychopathe
Messages
1 105
Score réaction
291
Points
230
Essaye donc

Code:
-- salaire
local salary = LocalPlayer():getDarkRPVar("salary")
draw.SimpleText( salaire.."$", "police", 260, 1040, Color( 255, 255, 255, 255 ))
 
ɓïℓℓγ

ɓïℓℓγ

Psychopathe
Messages
1 105
Score réaction
291
Points
230
Donc en gros :p

Code:
----------------------------------------------------------------
-- HUD RedWood
-----------------------------------------------------------------
-----------------------------------------------------------------
-- HUD COFIG
-----------------------------------------------------------------
-----------------------------------------------------------------
-- SUPP HUD
-----------------------------------------------------------------
local hideHUDElements = {
["DarkRP_HUD"] = true,
["DarkRP_HUD"] = true,
}
hook.Add("HUDShouldDraw", "flatHUD_HideDefaultDarkRPHud", function(name)
if hideHUDElements[name] then return false end
end)
-----------------------------------------------------------------
-- HUD POLICE
-----------------------------------------------------------------
surface.CreateFont("police",{
font = "Arial",
size = 18,
weight = 400,
antialias = true
})
-----------------------------------------------------------------
-- HUD PAINT
-----------------------------------------------------------------
hook.Add( "HUDPaint", "HUDPaint_DrawABox", function()
-- base de l'hud
draw.RoundedBox( 0, 10, 1000, 330, 70, Color( 61, 61, 61, 255 ) )
draw.RoundedBox( 0, 10, 930, 230, 70, Color( 61, 61, 61, 255 ) )
draw.RoundedBox( 0, 240, 930, 100, 70, Color( 61, 61, 61, 225 ) )
draw.RoundedBox( 0, 10, 910, 100, 20, Color( 61, 61, 61, 255 ) )
draw.RoundedBox( 0, 10, 1000, 330, 2, Color( 0, 0, 0, 255 ) )
draw.RoundedBox( 0, 240, 930, 2, 70, Color( 0, 0, 0, 255 ) )
-- Nom du serveur
draw.DrawText( "RedWood", "police", 23, 910, Color( 40, 40, 40, 255 ), 0, 0)
-- effet (vie, armure & faim)
draw.RoundedBox( 5, 60, 960, 175, 15, Color( 0, 0, 0, 200 ) )
draw.RoundedBox( 5, 60, 980, 175, 15, Color( 0, 0, 0, 200 ) )
draw.RoundedBox( 5, 60, 940, 175, 15, Color( 0, 0, 0, 200 ) )
-- gestion de vie
local health = (LocalPlayer():Health() or 0)
if health > 100 then health = 100 end
if health < 0 then health = 0 end
draw.RoundedBox( 0, 60, 960, health * 1.7, 10, Color( 255, 0, 0, 255 ))
draw.SimpleText( health.."%", "police", 15, 955, Color( 255, 255, 255, 255 ))
-- gestion d'armure
local armor = (LocalPlayer():Armor() or 0)
if armor > 100 then armor = 100 end
if armor < 0 then armor = 0 end
draw.RoundedBox( 0, 60, 980, armor * 1.7, 10, Color( 0, 0, 255, 255 ))
draw.SimpleText( armor.."%", "police", 15, 975, Color( 255, 255, 255, 255 ))
-- gestion de faim
local hunger = math.ceil(LocalPlayer():getDarkRPVar("Energy") or 0)
if hunger > 100 then hunger = 100 end
if hunger < 0 then hunger = 0 end
draw.RoundedBox( 0, 60, 940, hunger * 1.7, 10, Color( 0, 255, 0, 255 ))
draw.SimpleText( hunger.."%", "police", 15, 935, Color( 255, 255, 255, 255 ))
-- salaire
local salary = LocalPlayer():getDarkRPVar("salary")
draw.SimpleText( salaire.."$", "police", 260, 1040, Color( 255, 255, 255, 255 ))
-- job
local job = team.GetName(LocalPlayer():Team())
draw.SimpleText( job.."", "police", 25, 1040, Color( 255, 255, 255, 255 ))
-- nom
local name = LocalPlayer():Name()
draw.SimpleText( name, "police", 25, 1010, Color( 255, 255, 255, 255 ))
-- money
local money = LocalPlayer():getDarkRPVar("money")
draw.SimpleText( money.."$", "police", 260, 1010, Color( 255, 255, 255, 255 ))
-- license
local Page = Material("icon16/page_white_text.png")
local NoPage = Material("icon16/page_white_delete.png")
if LocalPlayer().DarkRPVars.HasGunlicense then
surface.SetMaterial(Page)
surface.SetDrawColor(255, 255, 255, 255)
surface.DrawTexturedRect(320, 1012, 13, 13)
else
surface.SetMaterial(NoPage)
surface.SetDrawColor(255, 255, 255, 255)
surface.DrawTexturedRect(320, 1012, 13, 13)
end
-----------------------------------------------------------------
-- HUD AGENDA
-----------------------------------------------------------------
local agenda = LocalPlayer():getAgendaTable()
if not agenda then return end
agendaText = agendaText or DarkRP.textWrap((LocalPlayer():getDarkRPVar("agenda") or ""):gsub("//", "\n"):gsub("\\n", "\n"), "DarkRPHUD1", 440)
draw.RoundedBox( 10, 10, 10, 460, 110, Color(61, 61, 61, 155) )
draw.RoundedBox( 10, 12, 12, 456, 106, Color(61, 61, 61,100) )
draw.RoundedBox( 10, 12, 12, 456, 20, Color(255, 255, 255, 255) )
draw.DrawNonParsedText( agenda.Title, "police", 30, 12, Color(0, 0, 0, 255), 0 )
draw.DrawNonParsedText( agendaText, "DarkRPHUD1", 30, 35, Color(0, 0, 0, 255), 0 )
if ply != LocalPlayer() then return end
if var == "agenda" and new then
agendaText = DarkRP.textWrap(new:gsub("//", "\n"):gsub("\\n", "\n"), "DarkRPHUD1", 440)
else
agendaText = nil
end
end )
-----------------------------------------------------------------
-- HUD AMMO
-----------------------------------------------------------------
-----------------------------------------------------------------
-- HUD PLAYER MODEL
-----------------------------------------------------------------
if(CLIENT)then
local function PlayerModel()
local ply=LocalPlayer()
PlayerModel = vgui.Create("DModelPanel")
function PlayerModel:LayoutEntity( Entity ) return end
PlayerModel:SetModel( LocalPlayer():GetModel() )
PlayerModel:SetPos(250,800)
PlayerModel:SetSize(75, 200)
PlayerModel:SetCamPos(Vector( 28, 0, 65))
PlayerModel:SetLookAt(Vector( - 20, 0, 105))
timer.Create( "UpdatePlayerModel", 0.5, 0, function()
if LocalPlayer():GetModel() != PlayerModel.Entity:GetModel() then
PlayerModel:Remove()
PlayerModel = vgui.Create("DModelPanel")
function PlayerModel:LayoutEntity( Entity ) return end
PlayerModel:SetModel( LocalPlayer():GetModel())
PlayerModel:SetPos(250,800)
PlayerModel:SetSize(75, 200)
PlayerModel:SetCamPos(Vector( 28, 0, 65))
PlayerModel:SetLookAt(Vector( - 20, 0, 105))
end
end)
end
hook.Add("InitPostEntity", "PlayerModel", PlayerModel)
end
 
Joe Leroi

Joe Leroi

Chuck Norris
Messages
4 368
Score réaction
933
Points
605
O
ɓïℓℓγ à dit:
Donc en gros :p

Code:
----------------------------------------------------------------
-- HUD RedWood
-----------------------------------------------------------------
-----------------------------------------------------------------
-- HUD COFIG
-----------------------------------------------------------------
-----------------------------------------------------------------
-- SUPP HUD
-----------------------------------------------------------------
local hideHUDElements = {
["DarkRP_HUD"] = true,
["DarkRP_HUD"] = true,
}
hook.Add("HUDShouldDraw", "flatHUD_HideDefaultDarkRPHud", function(name)
if hideHUDElements[name] then return false end
end)
-----------------------------------------------------------------
-- HUD POLICE
-----------------------------------------------------------------
surface.CreateFont("police",{
font = "Arial",
size = 18,
weight = 400,
antialias = true
})
-----------------------------------------------------------------
-- HUD PAINT
-----------------------------------------------------------------
hook.Add( "HUDPaint", "HUDPaint_DrawABox", function()
-- base de l'hud
draw.RoundedBox( 0, 10, 1000, 330, 70, Color( 61, 61, 61, 255 ) )
draw.RoundedBox( 0, 10, 930, 230, 70, Color( 61, 61, 61, 255 ) )
draw.RoundedBox( 0, 240, 930, 100, 70, Color( 61, 61, 61, 225 ) )
draw.RoundedBox( 0, 10, 910, 100, 20, Color( 61, 61, 61, 255 ) )
draw.RoundedBox( 0, 10, 1000, 330, 2, Color( 0, 0, 0, 255 ) )
draw.RoundedBox( 0, 240, 930, 2, 70, Color( 0, 0, 0, 255 ) )
-- Nom du serveur
draw.DrawText( "RedWood", "police", 23, 910, Color( 40, 40, 40, 255 ), 0, 0)
-- effet (vie, armure & faim)
draw.RoundedBox( 5, 60, 960, 175, 15, Color( 0, 0, 0, 200 ) )
draw.RoundedBox( 5, 60, 980, 175, 15, Color( 0, 0, 0, 200 ) )
draw.RoundedBox( 5, 60, 940, 175, 15, Color( 0, 0, 0, 200 ) )
-- gestion de vie
local health = (LocalPlayer():Health() or 0)
if health > 100 then health = 100 end
if health < 0 then health = 0 end
draw.RoundedBox( 0, 60, 960, health * 1.7, 10, Color( 255, 0, 0, 255 ))
draw.SimpleText( health.."%", "police", 15, 955, Color( 255, 255, 255, 255 ))
-- gestion d'armure
local armor = (LocalPlayer():Armor() or 0)
if armor > 100 then armor = 100 end
if armor < 0 then armor = 0 end
draw.RoundedBox( 0, 60, 980, armor * 1.7, 10, Color( 0, 0, 255, 255 ))
draw.SimpleText( armor.."%", "police", 15, 975, Color( 255, 255, 255, 255 ))
-- gestion de faim
local hunger = math.ceil(LocalPlayer():getDarkRPVar("Energy") or 0)
if hunger > 100 then hunger = 100 end
if hunger < 0 then hunger = 0 end
draw.RoundedBox( 0, 60, 940, hunger * 1.7, 10, Color( 0, 255, 0, 255 ))
draw.SimpleText( hunger.."%", "police", 15, 935, Color( 255, 255, 255, 255 ))
-- salaire
local salary = LocalPlayer():getDarkRPVar("salary")
draw.SimpleText( salaire.."$", "police", 260, 1040, Color( 255, 255, 255, 255 ))
-- job
local job = team.GetName(LocalPlayer():Team())
draw.SimpleText( job.."", "police", 25, 1040, Color( 255, 255, 255, 255 ))
-- nom
local name = LocalPlayer():Name()
draw.SimpleText( name, "police", 25, 1010, Color( 255, 255, 255, 255 ))
-- money
local money = LocalPlayer():getDarkRPVar("money")
draw.SimpleText( money.."$", "police", 260, 1010, Color( 255, 255, 255, 255 ))
-- license
local Page = Material("icon16/page_white_text.png")
local NoPage = Material("icon16/page_white_delete.png")
if LocalPlayer().DarkRPVars.HasGunlicense then
surface.SetMaterial(Page)
surface.SetDrawColor(255, 255, 255, 255)
surface.DrawTexturedRect(320, 1012, 13, 13)
else
surface.SetMaterial(NoPage)
surface.SetDrawColor(255, 255, 255, 255)
surface.DrawTexturedRect(320, 1012, 13, 13)
end
-----------------------------------------------------------------
-- HUD AGENDA
-----------------------------------------------------------------
local agenda = LocalPlayer():getAgendaTable()
if not agenda then return end
agendaText = agendaText or DarkRP.textWrap((LocalPlayer():getDarkRPVar("agenda") or ""):gsub("//", "\n"):gsub("\\n", "\n"), "DarkRPHUD1", 440)
draw.RoundedBox( 10, 10, 10, 460, 110, Color(61, 61, 61, 155) )
draw.RoundedBox( 10, 12, 12, 456, 106, Color(61, 61, 61,100) )
draw.RoundedBox( 10, 12, 12, 456, 20, Color(255, 255, 255, 255) )
draw.DrawNonParsedText( agenda.Title, "police", 30, 12, Color(0, 0, 0, 255), 0 )
draw.DrawNonParsedText( agendaText, "DarkRPHUD1", 30, 35, Color(0, 0, 0, 255), 0 )
if ply != LocalPlayer() then return end
if var == "agenda" and new then
agendaText = DarkRP.textWrap(new:gsub("//", "\n"):gsub("\\n", "\n"), "DarkRPHUD1", 440)
else
agendaText = nil
end
end )
-----------------------------------------------------------------
-- HUD AMMO
-----------------------------------------------------------------
-----------------------------------------------------------------
-- HUD PLAYER MODEL
-----------------------------------------------------------------
if(CLIENT)then
local function PlayerModel()
local ply=LocalPlayer()
PlayerModel = vgui.Create("DModelPanel")
function PlayerModel:LayoutEntity( Entity ) return end
PlayerModel:SetModel( LocalPlayer():GetModel() )
PlayerModel:SetPos(250,800)
PlayerModel:SetSize(75, 200)
PlayerModel:SetCamPos(Vector( 28, 0, 65))
PlayerModel:SetLookAt(Vector( - 20, 0, 105))
timer.Create( "UpdatePlayerModel", 0.5, 0, function()
if LocalPlayer():GetModel() != PlayerModel.Entity:GetModel() then
PlayerModel:Remove()
PlayerModel = vgui.Create("DModelPanel")
function PlayerModel:LayoutEntity( Entity ) return end
PlayerModel:SetModel( LocalPlayer():GetModel())
PlayerModel:SetPos(250,800)
PlayerModel:SetSize(75, 200)
PlayerModel:SetCamPos(Vector( 28, 0, 65))
PlayerModel:SetLookAt(Vector( - 20, 0, 105))
end
end)
end
hook.Add("InitPostEntity", "PlayerModel", PlayerModel)
end
Oui faut Local Salary st non salaire
 
  • J'aime
Réactions: ɓïℓℓγ
ɓïℓℓγ

ɓïℓℓγ

Psychopathe
Messages
1 105
Score réaction
291
Points
230
  • Initiateur de la discussion
DinamoPerixx

DinamoPerixx

Geek suprême
Messages
100
Score réaction
6
Points
115
Joe Leroi

Joe Leroi

Chuck Norris
Messages
4 368
Score réaction
933
Points
605
DinamoPerixx à dit:
merci à toi, c'est super sympa de m aider
Sache que la plupart du temps, c'est de l'anglais qu'il faut mettre comme le cas ici, en anglais c'est salary, or en français c'est salaire, sauf que le jeu, prenez que l'anglais pour ton cas à toi. Est-ce-un HUD que t'a crée ?
 
ɓïℓℓγ

ɓïℓℓγ

Psychopathe
Messages
1 105
Score réaction
291
Points
230
  • Initiateur de la discussion
DinamoPerixx

DinamoPerixx

Geek suprême
Messages
100
Score réaction
6
Points
115
ɓïℓℓγ à dit:
Pas de soucis :)
Joe Leroi à dit:
Sache que la plupart du temps, c'est de l'anglais qu'il faut mettre comme le cas ici, en anglais c'est salary, or en français c'est salaire, sauf que le jeu, prenez que l'anglais pour ton cas à toi. Est-ce-un HUD que t'a crée ?
oui je l ai créer Joe, et je vais encore abuser de votre gentillesse mais maintenant il me dis qu'il y a un problème dans ce code ^^

Code:
90 local salary = LocalPlayer():getDarkRPVar("salary")
91
92 draw.SimpleText( salary.."$", "police", 260, 1040, Color( 255, 255, 255, 255 )
93
94 -- job
95 local job = team.GetName(LocalPlayer():Team())
96
97 draw.SimpleText( job.."", "police", 25, 1040, Color( 255, 255, 255, 255 ))
98
l'erreur que la console me dit:

Code:
[ERROR] lua/cl_hud.lua:95: ')' expected (to close '(' at line 92) near 'local' 1. unknown - lua/cl_hud.lua:0
 
ɓïℓℓγ

ɓïℓℓγ

Psychopathe
Messages
1 105
Score réaction
291
Points
230
DinamoPerixx à dit:
oui je l ai créer Joe, et je vais encore abuser de votre gentillesse mais maintenant il me dis qu'il y a un problème dans ce code ^^

Code:
90 local salary = LocalPlayer():getDarkRPVar("salary")
91
92 draw.SimpleText( salary.."$", "police", 260, 1040, Color( 255, 255, 255, 255 )
93
94 -- job
95 local job = team.GetName(LocalPlayer():Team())
96
97 draw.SimpleText( job.."", "police", 25, 1040, Color( 255, 255, 255, 255 ))
98
l'erreur que la console me dit:

Code:
[ERROR] lua/cl_hud.lua:95: ')' expected (to close '(' at line 92) near 'local' 1. unknown - lua/cl_hud.lua:0
Je comprends pas toutes tes lignes de codes enfaites .
 
Joe Leroi

Joe Leroi

Chuck Norris
Messages
4 368
Score réaction
933
Points
605
DinamoPerixx à dit:
oui je l ai créer Joe, et je vais encore abuser de votre gentillesse mais maintenant il me dis qu'il y a un problème dans ce code ^^

Code:
90 local salary = LocalPlayer():getDarkRPVar("salary")
91
92 draw.SimpleText( salary.."$", "police", 260, 1040, Color( 255, 255, 255, 255 )
93
94 -- job
95 local job = team.GetName(LocalPlayer():Team())
96
97 draw.SimpleText( job.."", "police", 25, 1040, Color( 255, 255, 255, 255 ))
98
l'erreur que la console me dit:

Code:
[ERROR] lua/cl_hud.lua:95: ')' expected (to close '(' at line 92) near 'local' 1. unknown - lua/cl_hud.lua:0
Soucis de virgule, @Reijin
 
ɓïℓℓγ

ɓïℓℓγ

Psychopathe
Messages
1 105
Score réaction
291
Points
230
Trouvé ,

Tu as oublié de fermer la parenthése

Code:
92 draw.SimpleText( salary.."$", "police", 260, 1040, Color( 255, 255, 255, 255 ))
Au lieu de

Code:
92 draw.SimpleText( salary.."$", "police", 260, 1040, Color( 255, 255, 255, 255 )
 
ɓïℓℓγ

ɓïℓℓγ

Psychopathe
Messages
1 105
Score réaction
291
Points
230
Joe Leroi

Joe Leroi

Chuck Norris
Messages
4 368
Score réaction
933
Points
605
ɓïℓℓγ à dit:
Trouvé ,

Tu as oublié de fermer la parenthése

Code:
92 draw.SimpleText( salary.."$", "police", 260, 1040, Color( 255, 255, 255, 255 ))
Au lieu de

Code:
92 draw.SimpleText( salary.."$", "police", 260, 1040, Color( 255, 255, 255, 255 )
Euh, désolé, je réfléchissais à ma phrase pendant que j'écrivais donc j'ai foutu virgule. Car oui je sais encore lire une erreur :
[ERROR] lua/cl_hud.lua:95: ')' expected (to close '(' at line 92) near 'local'

Il n'arrive pas à fermer le "(" proche du local, et j'avais un doute sur ta résolution, donc je l'ai pas dit. Car normalement il l'en fallait deux )) mais j'était pas sûr.
 
ɓïℓℓγ

ɓïℓℓγ

Psychopathe
Messages
1 105
Score réaction
291
Points
230
Joe Leroi à dit:
Euh, désolé, je réfléchissais à ma phrase pendant que j'écrivais donc j'ai foutu virgule. Car oui je sais encore lire une erreur :
[ERROR] lua/cl_hud.lua:95: ')' expected (to close '(' at line 92) near 'local'

Il n'arrive pas à fermer le "(" proche du local, et j'avais un doute sur ta résolution, donc je l'ai pas dit. Car normalement il l'en fallait deux )) mais j'était pas sûr.
:)
 
  • J'aime
Réactions: Joe Leroi
  • Initiateur de la discussion
DinamoPerixx

DinamoPerixx

Geek suprême
Messages
100
Score réaction
6
Points
115
maintenant il me dis sa XD

Code:
[ERROR] addons/darkrpmodification-master/lua/darkrp_modules/hudrdw/cl_hud.lua:91: attempt to concatenate local 'salary' (a nil value) 1. v - addons/darkrpmodification-master/lua/darkrp_modules/hudrdw/cl_hud.lua:91 2. unknown - lua/includes/modules/hook.lua:84
alors que me code est
Code:
89 -- salaire
90 local salary = LocalPlayer():getDarkRPVar("salary")
91
92 draw.SimpleText( salary.."$", "police", 260, 1040, Color( 255, 255, 255, 255 ))
93
 
  • Initiateur de la discussion
DinamoPerixx

DinamoPerixx

Geek suprême
Messages
100
Score réaction
6
Points
115
ɓïℓℓγ à dit:
maintenant il me dis sa XD

Code:
[ERROR] addons/darkrpmodification-master/lua/darkrp_modules/hudrdw/cl_hud.lua:91: attempt to concatenate local 'salary' (a nil value)
1. v - addons/darkrpmodification-master/lua/darkrp_modules/hudrdw/cl_hud.lua:91
2. unknown - lua/includes/modules/hook.lua:84
alors que me code est
Code:
89 -- salaire
90 local salary = LocalPlayer():getDarkRPVar("salary")
91
92 draw.SimpleText( salary.."$", "police", 260, 1040, Color( 255, 255, 255, 255 ))
93
 
Discord d'entraide
Rejoignz-nous sur Discord