Skip to content
  • Fight Night
  • Server Release
  • Testing Sessions
  • Server Rules (All Servers)
  • (In) Territory Laws
  • City Laws
  • Drained Server Rules
  • Devastated Server Rules
  • Little Creek Server Rules
  • In For A Penny Server Rules
Territory

Territory

Western RP with a Twist

  • Calendar of Events
  • FAQ’s
  • Tutorials
  • Contact Staff
  • Server List
  • Server Rules (All Servers)
  • Toggle search form
Tutorails for Redm, CFX, or Vorp

Tutorial: My client crashes when I test my new code? – RedM Server – Lua

Posted on July 25, 2022November 28, 2022 By Crimson Creek Team No Comments on Tutorial: My client crashes when I test my new code? – RedM Server – Lua

Lots of things can cause this, unfortunately. The most common one we’ve found is A) you have nil where your not expecting one, or B) you have a while loop with no “wait”.

Solution to A: Check for nil’s

if  variable ~= nil then
-- do something
end

Solution for B:
Every while has to have a wait. The wat can be zero but it has to be there. Yes, I know that makes no sense, but that’s the reality of cfx and redm. Put the wait in, you’ll thank us later.

while true do
    Citizen.Wait(0)  -- triggers some event or variable that prevents client crash
end

Crimson Creek Team

Crimson Creek Team, a group of volunteers working together to have a good time RPing and running our servers.

See author's posts

Hits: 11

Blog, Code Tutorials, FAQ

Post navigation

Previous Post: Dev Blog – July 9th
Next Post: RedM – Crimson Creek Team- Aug 1st 2022

Related Posts

Little Creek Little Creek by Crimson Creek Blog
Tutorails for Redm, CFX, or Vorp Blog – RedM – Crimson Creek Project Blog
Tutorails for Redm, CFX, or Vorp July Status Report – Crimson Creek Team Blog
Server Thumbnail Crimson Creek – VORP Testing Blog
Tutorails for Redm, CFX, or Vorp RedM/CFX/VORP Project – Download and install. Blog
Server Thumbnail How do I connect to a test server? Blog

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *


Newsletter



Holiday Events

There are no upcoming events.

Archive

  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022

Donations

Patreon

Kofi

There are no upcoming events at this time

February 2023
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728  
« Dec    

Copyright © 2023 Territory.

Powered by PressBook Masonry Dark

Loading...

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.